[OpenWrt-Devel] [PATCH] ar71xx: Add support for the WNDR3800CH

2014-08-03 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

Apparently this is a fairly common refurb unit of the 3800 series now,
with merely the recognition string changed in the boot loader.

Signed-off-by: Dave Taht dave.t...@bufferbloat.net
---
 target/linux/ar71xx/image/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 2377ad3..f8a49a8 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -,6 +,7 @@ $(eval $(call 
SingleProfile,Netgear,64kraw,N150R,n150r,WNR612V2,ttyS0,115200,$$(
 $(eval $(call 
SingleProfile,Netgear,64kraw,WNDR3700V1,wndr3700,WNDR3700,ttyS0,115200,$$(wndr3700_mtdlayout),0x33373030,WNDR3700,
 NA,,7 864 320))
 $(eval $(call 
SingleProfile,Netgear,64kraw,WNDR3700V2,wndr3700v2,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),0x33373031,WNDR3700v2,,-H
 29763654+16+64))
 $(eval $(call 
SingleProfile,Netgear,64kraw,WNDR3800,wndr3800,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),0x33373031,WNDR3800,,-H
 29763654+16+128))
+$(eval $(call 
SingleProfile,Netgear,64kraw,WNDR3800CH,wndr3800ch,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),0x33373031,WNDR3800CH,,-H
 29763654+16+128))
 $(eval $(call 
SingleProfile,Netgear,64kraw,WNDRMAC,wndrmac,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),0x33373031,WNDRMAC,,-H
 29763654+16+64))
 $(eval $(call 
SingleProfile,Netgear,64kraw,WNDRMACV2,wndrmacv2,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),0x33373031,WNDRMACv2,,-H
 29763654+16+128))
 
@@ -1266,7 +1267,7 @@ $(eval $(call MultiProfile,TLWR1043,TLWR1043V1 
TLWR1043V2))
 $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 
TLWDR4300V1IL TLWDR4310V1 MW4530RV1))
 $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
 $(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 
UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTUNIFI UBNTUNIFIOUTDOOR UAPPRO 
UBNTAIRGW))
-$(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDRMAC 
WNDRMACV2))
+$(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDR3800CH 
WNDRMAC WNDRMACV2))
 $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
 $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
 $(eval $(call MultiProfile,WPE72,WPE72_4M WPE72_8M WPE72_16M))
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Add support for the WNDR3800CH

2014-08-02 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

Apparently this is a fairly common refurb unit of the 3800 series now,
with merely the recognition string changed in the boot loader.
---
 target/linux/ar71xx/image/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 2377ad3..f8a49a8 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -,6 +,7 @@ $(eval $(call 
SingleProfile,Netgear,64kraw,N150R,n150r,WNR612V2,ttyS0,115200,$$(
 $(eval $(call 
SingleProfile,Netgear,64kraw,WNDR3700V1,wndr3700,WNDR3700,ttyS0,115200,$$(wndr3700_mtdlayout),0x33373030,WNDR3700,
 NA,,7 864 320))
 $(eval $(call 
SingleProfile,Netgear,64kraw,WNDR3700V2,wndr3700v2,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),0x33373031,WNDR3700v2,,-H
 29763654+16+64))
 $(eval $(call 
SingleProfile,Netgear,64kraw,WNDR3800,wndr3800,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),0x33373031,WNDR3800,,-H
 29763654+16+128))
+$(eval $(call 
SingleProfile,Netgear,64kraw,WNDR3800CH,wndr3800ch,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),0x33373031,WNDR3800CH,,-H
 29763654+16+128))
 $(eval $(call 
SingleProfile,Netgear,64kraw,WNDRMAC,wndrmac,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),0x33373031,WNDRMAC,,-H
 29763654+16+64))
 $(eval $(call 
SingleProfile,Netgear,64kraw,WNDRMACV2,wndrmacv2,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),0x33373031,WNDRMACv2,,-H
 29763654+16+128))
 
@@ -1266,7 +1267,7 @@ $(eval $(call MultiProfile,TLWR1043,TLWR1043V1 
TLWR1043V2))
 $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 
TLWDR4300V1IL TLWDR4310V1 MW4530RV1))
 $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
 $(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 
UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTUNIFI UBNTUNIFIOUTDOOR UAPPRO 
UBNTAIRGW))
-$(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDRMAC 
WNDRMACV2))
+$(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDR3800CH 
WNDRMAC WNDRMACV2))
 $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
 $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
 $(eval $(call MultiProfile,WPE72,WPE72_4M WPE72_8M WPE72_16M))
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC PATCH] Getting more eyeballs on a better QoS system

2014-03-29 Thread Dave Täht
CeroWrt has been working on a better fq_codel based QoS/AQM/packet
scheduler system for eliminating bufferbloat on DSL devices and
cable modems for quite some time now. I'd like it if it - or
the ideas in it - made it into openwrt eventually - 

But:

I'd rather like to get more eyeballs on it and feedback on how
to improve it further. In particular, we are limited in CeroWrt
to an aging wndr3800 based device, and run out of CPU rate limiting
to about 60Mbit. I'd love to get people with higher end hardware
trying these packages to see what sorts of results can be obtained
with connections running at 90mbit or higher.

secondly the code could use some eyeballs as to general openwrt
package compliance and coding standards. (sqm-scripts was not 
written, but evolved

thirdly adding in more of the features that are in qos-scripts
would be nice...

Gui interface coming up in the next patch
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC PATCH] packages: Smart Queue Management for AQM Packet Scheduling and Qos from CeroWrt

2014-03-29 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

This adds support for the bufferbloat project's Smart Queue Management
(SQM) system, which improves over openwrt's qos-scripts in the following ways

+ Uses HTB with two models for managing traffic
  a simplest one that merely uses fq_codel, and a three tier one that does
  some basic and tunable packet prioritization.

+ Works with ipv6 and ipv4 correctly (unlike qos-scripts)
+ extensive support for fixing ADSL and PPOe framing problems
+ Partial support for key diffserv markings
+ highly tuned fq_codel implementation especially for low bandwidths
+ Tested heavily on cable modems and on dsl devices

It is a disimprovement in that:

- There are no built-in tricks for doing l7 classification,
or other forms of packet inspection.

- We haven't explored hfsc all that much, prefering to rely
on the predictable behavior of htb + fq_codel for everything

- And there is support for a few qdiscs that are not in the linux
kernel mainline that remain experimental.
---
 net/sqm-scripts/Makefile   |   48 +++
 net/sqm-scripts/files/etc/config/sqm   |   11 +
 net/sqm-scripts/files/etc/init.d/sqm   |   23 ++
 net/sqm-scripts/files/usr/lib/sqm/functions.sh |  335 
 net/sqm-scripts/files/usr/lib/sqm/run.sh   |   67 
 net/sqm-scripts/files/usr/lib/sqm/simple.qos   |  187 +++
 net/sqm-scripts/files/usr/lib/sqm/simple.qos.help  |1 +
 net/sqm-scripts/files/usr/lib/sqm/simplest.qos |   84 +
 .../files/usr/lib/sqm/simplest.qos.help|1 +
 net/sqm-scripts/files/usr/lib/sqm/stop.sh  |   22 ++
 10 files changed, 779 insertions(+)
 create mode 100644 net/sqm-scripts/Makefile
 create mode 100644 net/sqm-scripts/files/etc/config/sqm
 create mode 100755 net/sqm-scripts/files/etc/init.d/sqm
 create mode 100644 net/sqm-scripts/files/usr/lib/sqm/functions.sh
 create mode 100755 net/sqm-scripts/files/usr/lib/sqm/run.sh
 create mode 100755 net/sqm-scripts/files/usr/lib/sqm/simple.qos
 create mode 100644 net/sqm-scripts/files/usr/lib/sqm/simple.qos.help
 create mode 100755 net/sqm-scripts/files/usr/lib/sqm/simplest.qos
 create mode 100644 net/sqm-scripts/files/usr/lib/sqm/simplest.qos.help
 create mode 100755 net/sqm-scripts/files/usr/lib/sqm/stop.sh

diff --git a/net/sqm-scripts/Makefile b/net/sqm-scripts/Makefile
new file mode 100644
index 000..1c92354
--- /dev/null
+++ b/net/sqm-scripts/Makefile
@@ -0,0 +1,48 @@
+# 
+# Copyright (C) 2006-2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=sqm-scripts
+PKG_VERSION:=5
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/sqm-scripts
+  SECTION:=net
+  CATEGORY:=Base system
+  DEPENDS:=+tc +kmod-sched +kmod-ifb +iptables +iptables-mod-filter 
+iptables-mod-ipopt +iptables-mod-conntrack-extra
+  TITLE:=SQM Scripts
+  PKGARCH:=all
+endef
+
+define Package/sqm-scripts/description
+ A set of scripts that does simple SQM configuration.
+endef
+
+define Package/sqm-scripts/conffiles
+/etc/config/sqm
+endef
+
+define Build/Prepare
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/sqm-scripts/install
+   $(INSTALL_DIR) $(1)
+   $(CP) ./files/* $(1)/
+endef
+
+$(eval $(call BuildPackage,sqm-scripts))
diff --git a/net/sqm-scripts/files/etc/config/sqm 
b/net/sqm-scripts/files/etc/config/sqm
new file mode 100644
index 000..547d321
--- /dev/null
+++ b/net/sqm-scripts/files/etc/config/sqm
@@ -0,0 +1,11 @@
+
+config queue 'ge00'
+option enabled '0'
+option interface 'ge00'
+option download '2'
+option upload '4000'
+option qdisc 'fq_codel'
+option script 'simple.qos'
+option qdisc_advanced '0'
+option linklayer 'none'
+
diff --git a/net/sqm-scripts/files/etc/init.d/sqm 
b/net/sqm-scripts/files/etc/init.d/sqm
new file mode 100755
index 000..70307a6
--- /dev/null
+++ b/net/sqm-scripts/files/etc/init.d/sqm
@@ -0,0 +1,23 @@
+#!/bin/sh /etc/rc.common
+
+START=50
+
+reload()
+{
+/usr/lib/sqm/run.sh
+}
+
+restart()
+{
+reload
+}
+
+start()
+{
+reload
+}
+
+stop()
+{
+/usr/lib/sqm/run.sh stop
+}
\ No newline at end of file
diff --git a/net/sqm-scripts/files/usr/lib/sqm/functions.sh 
b/net/sqm-scripts/files/usr/lib/sqm/functions.sh
new file mode 100644
index 000..576af6d
--- /dev/null
+++ b/net/sqm-scripts/files/usr/lib/sqm/functions.sh
@@ -0,0 +1,335 @@
+
+insmod() {
+  lsmod | grep -q ^$1 || $INSMOD $1
+}
+
+ipt() {
+  d=`echo $* | sed s/-A/-D/g`
+  [ $d != $* ]  {
+   iptables $d  /dev/null 21
+   ip6tables $d  /dev/null 21
+  }
+  iptables $*  /dev/null 21
+  ip6tables $*  /dev/null 21
+}
+
+do_modules() {
+   insmod act_ipt
+   insmod sch_$QDISC
+   insmod sch_ingress
+   insmod act_mirred
+   

[OpenWrt-Devel] [RFC PATCH] luci: Add cerowrt SQM qos aqm and packet scheduler gui

2014-03-29 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

---
 applications/luci-app-sqm/Makefile |   66 +++
 applications/luci-app-sqm/files/sqm-cbi.lua|  195 
 applications/luci-app-sqm/files/sqm-controller.lua |   26 +++
 applications/luci-app-sqm/files/uci-defaults-sqm   |   12 ++
 4 files changed, 299 insertions(+)
 create mode 100644 applications/luci-app-sqm/Makefile
 create mode 100644 applications/luci-app-sqm/files/sqm-cbi.lua
 create mode 100644 applications/luci-app-sqm/files/sqm-controller.lua
 create mode 100755 applications/luci-app-sqm/files/uci-defaults-sqm

diff --git a/applications/luci-app-sqm/Makefile 
b/applications/luci-app-sqm/Makefile
new file mode 100644
index 000..6b3fb07
--- /dev/null
+++ b/applications/luci-app-sqm/Makefile
@@ -0,0 +1,66 @@
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=luci-app-sqm
+PKG_VERSION:=2
+PKG_RELEASE:=1
+LUCI_DIR:=/usr/lib/lua/luci
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luci-app-sqm
+  SECTION:=luci
+  CATEGORY:=LuCI
+  TITLE:=SQM script LuCI interface
+  MAINTAINER:=Toke Høiland-Jørgensen t...@toke.dk
+  PKGARCH:=all
+  DEPENDS:= lua luci-lib-core +sqm-scripts
+  SUBMENU:=3. Applications
+endef
+
+define Package/luci-app-sqm/description
+   Control the simple_qos SQM script
+endef
+
+define Build/Compile
+endef
+
+define Build/Configure
+endef
+
+define Package/luci-app-sqm/install
+   $(INSTALL_DIR) $(1)$(LUCI_DIR)/controller $(1)$(LUCI_DIR)/model/cbi
+   $(INSTALL_DATA) ./files/sqm-controller.lua 
$(1)$(LUCI_DIR)/controller/sqm.lua
+   $(INSTALL_DATA) ./files/sqm-cbi.lua $(1)$(LUCI_DIR)/model/cbi/sqm.lua
+   $(INSTALL_DIR) $(1)/etc/uci-defaults
+   $(INSTALL_BIN) ./files/uci-defaults-sqm $(1)/etc/uci-defaults/luci-sqm
+endef
+
+define Package/luci-app-sqm/postinst
+#!/bin/sh
+which uci  /dev/null || exit 0
+uci -q get ucitrack.@sqm[0]  /dev/null || {
+  uci add ucitrack sqm  /dev/null
+  uci set ucitrack.@sqm[0].init=sqm
+  uci add_list ucitrack.@firewall[0].affects=sqm
+  uci commit
+}
+endef
+
+define Package/luci-app-sqm/postrm
+#!/bin/sh
+which uci  /dev/null || exit 0
+uci -q get ucitrack.@sqm[0]  /dev/null  {
+  uci delete ucitrack.@sqm[0]
+  uci del_list ucitrack.@firewall[0].affects=sqm
+  uci commit
+}
+endef
+
+$(eval $(call BuildPackage,luci-app-sqm))
diff --git a/applications/luci-app-sqm/files/sqm-cbi.lua 
b/applications/luci-app-sqm/files/sqm-cbi.lua
new file mode 100644
index 000..52885c0
--- /dev/null
+++ b/applications/luci-app-sqm/files/sqm-cbi.lua
@@ -0,0 +1,195 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth ste...@midlink.org
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+local wa = require luci.tools.webadmin
+local fs = require nixio.fs
+local net = require luci.model.network.init()
+local ifaces = net:get_interfaces()
+local path = /usr/lib/sqm
+
+m = Map(sqm, translate(Smart Queue Management),
+   translate(With abbr title=\Smart Queue Management\SQM/abbr you  
..
+   can enable traffic shaping, better mixing (Fair Queueing), ..
+active queue length management (AQM)  ..
+and prioritisation on one  ..
+   network interface.))
+
+s = m:section(TypedSection, queue, translate(Queues))
+s:tab(tab_basic, translate(Basic Settings))
+s:tab(tab_qdisc, translate(Queue Discipline))
+s:tab(tab_linklayer, translate(Link Layer Adaptation))
+s.addremove = false -- set to true to allow adding SQM instances in the GUI
+s.anonymous = true
+
+-- BASIC
+e = s:taboption(tab_basic, Flag, enabled, translate(Enable))
+e.rmempty = false
+
+n = s:taboption(tab_basic, ListValue, interface, translate(Interface 
name))
+for _, iface in ipairs(ifaces) do
+ if iface:is_up() then
+   n:value(iface:name())
+ end
+end
+n.rmempty = false
+
+dl = s:taboption(tab_basic, Value, download, translate(Download speed 
(kbit/s) (ingress):))
+dl.datatype = and(uinteger,min(0))
+dl.rmempty = false
+
+ul = s:taboption(tab_basic, Value, upload, translate(Upload speed 
(kbit/s) (egress):))
+ul.datatype = and(uinteger,min(0))
+ul.rmempty = false
+
+-- QDISC
+
+c = s:taboption(tab_qdisc, ListValue, qdisc, translate(Queueing 
discipline))
+c:value(fq_codel, fq_codel (..translate(default)..))
+c:value(efq_codel)
+c:value(nfq_codel)
+c:value(sfq)
+c:value(codel)
+c:value(ns2_codel)
+c:value(pie)
+c:value(sfq)
+c.default = fq_codel
+c.rmempty = false
+
+local qos_desc = 
+sc = s:taboption(tab_qdisc, ListValue, script, translate(Queue setup 
script))
+for file in fs.dir(path) do
+  if string.find(file, .qos$) then
+sc:value(file)
+  end
+  if 

[OpenWrt-Devel] [RFC PATCH] luci support for SQM gui

2014-03-29 Thread Dave Täht
This adds gui support to the SQM-scripts patch
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] BCP38 support for home routers

2014-03-29 Thread Dave Täht
This package implements enough functionality (we hope) to make
implementing BCP38 in openwrt a snap. By default it comes
with an implementation suitable for natted hosts.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] packages: BCP38 support for openwrt

2014-03-29 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

This adds firewall support for blocking common invalid address
ranges, using ipset.
---
 net/bcp38/Makefile |   63 ++
 net/bcp38/files/bcp38.config   |   22 +
 net/bcp38/files/bcp38.defaults |   13 ++
 net/bcp38/files/run.sh |   96 
 4 files changed, 194 insertions(+)
 create mode 100644 net/bcp38/Makefile
 create mode 100644 net/bcp38/files/bcp38.config
 create mode 100644 net/bcp38/files/bcp38.defaults
 create mode 100755 net/bcp38/files/run.sh

diff --git a/net/bcp38/Makefile b/net/bcp38/Makefile
new file mode 100644
index 000..d777e13
--- /dev/null
+++ b/net/bcp38/Makefile
@@ -0,0 +1,63 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+# Please note this is not an officially released version of bcp38
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bcp38
+PKG_VERSION:=4
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bcp38
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Routing and Redirection
+  TITLE:=BCP38 compliance 
+  URL:=http://www.github.com/dtaht/bcp38
+  MAINTAINER:=Dave Taht d+bc...@taht.net
+  DEPENDS:=+ipset
+endef
+
+define Package/bcp38/description
+ bcp38 implements rfc bcp 38 for home routers.
+endef
+
+define Package/bcp38/conffiles
+/etc/config/bcp38
+endef
+
+define Build/Prepare
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/bcp38/install
+   $(INSTALL_DIR) $(1)/etc/config
+   $(INSTALL_CONF) ./files/bcp38.config $(1)/etc/config/bcp38
+   $(INSTALL_DIR) $(1)/usr/lib/bcp38
+   $(INSTALL_BIN) ./files/run.sh $(1)/usr/lib/bcp38/run.sh
+   $(INSTALL_DIR) $(1)/etc/uci-defaults
+   $(INSTALL_BIN) ./files/bcp38.defaults $(1)/etc/uci-defaults/bcp38
+endef
+
+define Package/bcp38/postinst
+#!/bin/sh
+[ -x /etc/uci-defaults/bcp38 ]  /etc/uci-defaults/bcp38 || exit 0
+endef
+
+define Package/bcp38/postrm
+#!/bin/sh
+uci delete firewall.bcp38
+uci commit
+endef
+
+$(eval $(call BuildPackage,bcp38))
diff --git a/net/bcp38/files/bcp38.config b/net/bcp38/files/bcp38.config
new file mode 100644
index 000..80431e5
--- /dev/null
+++ b/net/bcp38/files/bcp38.config
@@ -0,0 +1,22 @@
+config bcp38
+   option enabled 1
+   option interface 'ge00'
+   option detect_upstream 1
+   list match '127.0.0.0/8'
+   list match '0.0.0.0/8'   # RFC 1700
+   list match '240.0.0.0/4' # RFC 5745
+   list match '192.0.2.0/24'# RFC 5737
+   list match '198.51.100.0/24' # RFC 5737
+   list match '203.0.113.0/24'  # RFC 5737
+   list match '192.168.0.0/16'  # RFC 1918
+   list match '10.0.0.0/8'  # RFC 1918
+   list match '172.16.0.0/12'   # RFC 1918
+   list match '169.254.0.0/16'  # RFC 3927
+
+#  list nomatch '172.26.0.0/21' # Example of something not to match
+#  There is a dhcp trigger to do this for the netmask of a 
+#  double natted connection needed
+
+#  I will argue that this level of indirection doesn't scale
+#  very well - see how to block china as an example
+#  http://www.okean.com/china.txt
diff --git a/net/bcp38/files/bcp38.defaults b/net/bcp38/files/bcp38.defaults
new file mode 100644
index 000..d7e0d80
--- /dev/null
+++ b/net/bcp38/files/bcp38.defaults
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+uci -q batch -EOT
+   delete firewall.bcp38
+   set firewall.bcp38=include
+   set firewall.bcp38.type=script
+   set firewall.bcp38.path=/usr/lib/bcp38/run.sh
+   set firewall.bcp38.family=IPv4
+   set firewall.bcp38.reload=1
+   commit firewall
+EOT
+
+exit 0
diff --git a/net/bcp38/files/run.sh b/net/bcp38/files/run.sh
new file mode 100755
index 000..33ec531
--- /dev/null
+++ b/net/bcp38/files/run.sh
@@ -0,0 +1,96 @@
+#!/bin/sh
+
+STOP=$1
+IPSET_NAME=bcp38-ipv4
+IPTABLES_CHAIN=BCP38
+
+. /lib/functions.sh
+
+config_load bcp38
+
+add_bcp38_rule()
+{
+   local subnet=$1
+   local action=$2
+
+   if [ $action == nomatch ]; then
+   ipset add $IPSET_NAME $subnet nomatch
+   else
+   ipset add $IPSET_NAME $subnet
+   fi
+}
+
+detect_upstream()
+{
+   local interface=$1
+
+   subnets=$(ip route show dev $interface  | grep 'scope link' | awk 
'{print $1}')
+   for subnet in $subnets; do
+   # ipset test doesn't work for subnets, so strip out the subnet 
part
+   # and test for that; add as exception if there's a match
+   addr=$(echo $subnet | sed 's|/[0-9]\+$||')
+   ipset test $IPSET_NAME $addr 2/dev/null  add_bcp38_rule 
$subnet nomatch
+   done
+}
+
+run() {
+   local section=$1
+   local enabled
+   local interface
+   local detect_upstream
+   config_get_bool enabled $section enabled 0
+   config_get interface $section interface
+ 

[OpenWrt-Devel] [PATCH] util-linux: backport upstream fix for unshare utility

2014-03-29 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

the unshare utility wasn't getting certain defines for mount
anymore.
---
 ...lude-libmount.h-to-provide-missing-MS_-de.patch |   44 
 1 file changed, 44 insertions(+)
 create mode 100644 
package/utils/util-linux/patches/003-unshare-include-libmount.h-to-provide-missing-MS_-de.patch

diff --git 
a/package/utils/util-linux/patches/003-unshare-include-libmount.h-to-provide-missing-MS_-de.patch
 
b/package/utils/util-linux/patches/003-unshare-include-libmount.h-to-provide-missing-MS_-de.patch
new file mode 100644
index 000..27a4838
--- /dev/null
+++ 
b/package/utils/util-linux/patches/003-unshare-include-libmount.h-to-provide-missing-MS_-de.patch
@@ -0,0 +1,44 @@
+From d754315c54af9cb8222e0a04ed5b2b4b927ed176 Mon Sep 17 00:00:00 2001
+From: Ruediger Meier ruediger.me...@ga-group.nl
+Date: Mon, 17 Mar 2014 11:48:47 +0100
+Subject: [PATCH 262/288] unshare: include libmount.h to provide missing MS_*
+ defines
+
+Since 6728ca10 we are using MS_PRIVATE and MS_REC which are not defined
+in some systems's sys/mount.h.
+
+Signed-off-by: Ruediger Meier ruediger.me...@ga-group.nl
+---
+ sys-utils/Makemodule.am |1 +
+ sys-utils/unshare.c |3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am
+index 30b5d3e..93a2c8d 100644
+--- a/sys-utils/Makemodule.am
 b/sys-utils/Makemodule.am
+@@ -296,6 +296,7 @@ usrbin_exec_PROGRAMS += unshare
+ dist_man_MANS += sys-utils/unshare.1
+ unshare_SOURCES = sys-utils/unshare.c
+ unshare_LDADD = $(LDADD) libcommon.la
++unshare_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir)
+ endif
+ 
+ if BUILD_NSENTER
+diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c
+index 91e0ec7..1240293 100644
+--- a/sys-utils/unshare.c
 b/sys-utils/unshare.c
+@@ -27,6 +27,9 @@
+ #include sys/wait.h
+ #include sys/mount.h
+ 
++/* we only need some defines missing in sys/mount.h, no libmount linkage */
++#include libmount.h
++
+ #include nls.h
+ #include c.h
+ #include closestream.h
+-- 
+1.7.9.5
+
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] gpsd: update to 3.10

2014-02-19 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

---
 net/gpsd/Makefile |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/gpsd/Makefile b/net/gpsd/Makefile
index ca4983a..9195b25 100644
--- a/net/gpsd/Makefile
+++ b/net/gpsd/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gpsd
-PKG_VERSION:=3.7
+PKG_VERSION:=3.10
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/gpsd
-PKG_MD5SUM:=52d9785eaf1a51298bb8900dbde88f98
+PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/gpsd/
+PKG_MD5SUM:=fc5b03aae38b9b5b6880b31924d0ace3
 
 PKG_BUILD_DEPENDS:=libncurses libusb-1.0
 
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] Improve fq_codel hashing for 6in4 6to4 801.ad and IPIP cases

2014-02-18 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

This is a backport of code to improve the quality of fq_codel
hashing for 3.10 for some encapsulated protocols.

Not needed in 3.11 and later.
---
 .../686-flow_dissector-clean-up-IPIP-case.patch|   30 
 ...ow_dissector-add-support-for-IPPROTO_IPV6.patch |   30 
 ...88-net-flow_dissector-add-802.1ad-support.patch |   29 +++
 3 files changed, 89 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.10/686-flow_dissector-clean-up-IPIP-case.patch
 create mode 100644 
target/linux/generic/patches-3.10/687-flow_dissector-add-support-for-IPPROTO_IPV6.patch
 create mode 100644 
target/linux/generic/patches-3.10/688-net-flow_dissector-add-802.1ad-support.patch

diff --git 
a/target/linux/generic/patches-3.10/686-flow_dissector-clean-up-IPIP-case.patch 
b/target/linux/generic/patches-3.10/686-flow_dissector-clean-up-IPIP-case.patch
new file mode 100644
index 000..151c148
--- /dev/null
+++ 
b/target/linux/generic/patches-3.10/686-flow_dissector-clean-up-IPIP-case.patch
@@ -0,0 +1,30 @@
+From de03a7f8eddba389668e3c35d4a31d985d29778f Mon Sep 17 00:00:00 2001
+From: Tom Herbert therb...@google.com
+Date: Mon, 29 Jul 2013 11:07:36 -0700
+Subject: [PATCH 3/5] flow_dissector: clean up IPIP case
+
+Explicitly set proto to ETH_P_IP and jump directly to ip processing.
+
+Signed-off-by: Tom Herbert therb...@google.com
+Signed-off-by: David S. Miller da...@davemloft.net
+---
+ net/core/flow_dissector.c |3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
+index 00ee068..3259446 100644
+--- a/net/core/flow_dissector.c
 b/net/core/flow_dissector.c
+@@ -139,7 +139,8 @@ ipv6:
+   break;
+   }
+   case IPPROTO_IPIP:
+-  goto again;
++  proto = htons(ETH_P_IP);
++  goto ip;
+   default:
+   break;
+   }
+-- 
+1.7.9.5
+
diff --git 
a/target/linux/generic/patches-3.10/687-flow_dissector-add-support-for-IPPROTO_IPV6.patch
 
b/target/linux/generic/patches-3.10/687-flow_dissector-add-support-for-IPPROTO_IPV6.patch
new file mode 100644
index 000..2f8ab3e
--- /dev/null
+++ 
b/target/linux/generic/patches-3.10/687-flow_dissector-add-support-for-IPPROTO_IPV6.patch
@@ -0,0 +1,30 @@
+From 9c60237cd842c337539b1d72582b8cc410aeb3a6 Mon Sep 17 00:00:00 2001
+From: Tom Herbert therb...@google.com
+Date: Mon, 29 Jul 2013 11:07:42 -0700
+Subject: [PATCH 4/5] flow_dissector: add support for IPPROTO_IPV6
+
+Support IPPROTO_IPV6 similar to IPPROTO_IPIP
+
+Signed-off-by: Tom Herbert therb...@google.com
+Signed-off-by: David S. Miller da...@davemloft.net
+---
+ net/core/flow_dissector.c |3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
+index 3259446..ade9ff1 100644
+--- a/net/core/flow_dissector.c
 b/net/core/flow_dissector.c
+@@ -141,6 +141,9 @@ ipv6:
+   case IPPROTO_IPIP:
+   proto = htons(ETH_P_IP);
+   goto ip;
++  case IPPROTO_IPV6:
++  proto = htons(ETH_P_IPV6);
++  goto ipv6;
+   default:
+   break;
+   }
+-- 
+1.7.9.5
+
diff --git 
a/target/linux/generic/patches-3.10/688-net-flow_dissector-add-802.1ad-support.patch
 
b/target/linux/generic/patches-3.10/688-net-flow_dissector-add-802.1ad-support.patch
new file mode 100644
index 000..49d9e1b
--- /dev/null
+++ 
b/target/linux/generic/patches-3.10/688-net-flow_dissector-add-802.1ad-support.patch
@@ -0,0 +1,29 @@
+From 017879b546ee5f85d13f90236a251d56605c9e86 Mon Sep 17 00:00:00 2001
+From: Eric Dumazet eduma...@google.com
+Date: Tue, 6 Aug 2013 04:35:06 -0700
+Subject: [PATCH 5/5] net: flow_dissector: add 802.1ad support
+
+Same behavior than 802.1q : finds the encapsulated protocol and
+skip 32bit header.
+
+Signed-off-by: Eric Dumazet eduma...@google.com
+Signed-off-by: David S. Miller da...@davemloft.net
+---
+ net/core/flow_dissector.c |1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
+index ade9ff1..159737c 100644
+--- a/net/core/flow_dissector.c
 b/net/core/flow_dissector.c
+@@ -65,6 +65,7 @@ ipv6:
+   nhoff += sizeof(struct ipv6hdr);
+   break;
+   }
++  case __constant_htons(ETH_P_8021AD):
+   case __constant_htons(ETH_P_8021Q): {
+   const struct vlan_hdr *vlan;
+   struct vlan_hdr _vlan;
+-- 
+1.7.9.5
+
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] Improved random number support for mips

2014-02-18 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

The basic mips patch (deleted here) is not the full architecture
for faster random number generation. This patchset adds better
inlining specific to mips architectures.
---
 .../307-mips-Reimplement-get_cycles.patch  |   69 -
 ...w-architectures-to-optionally-define-rand.patch |   90 +
 ...zed-support-for-get_cycles-and-random_get.patch |  102 
 ...-mainline-linux-doesnt-have-prid_imp_mask.patch |   28 ++
 4 files changed, 220 insertions(+), 69 deletions(-)
 delete mode 100644 
target/linux/generic/patches-3.10/307-mips-Reimplement-get_cycles.patch
 create mode 100644 
target/linux/generic/patches-3.10/350-random-allow-architectures-to-optionally-define-rand.patch
 create mode 100644 
target/linux/generic/patches-3.10/351-MIPS-optimized-support-for-get_cycles-and-random_get.patch
 create mode 100644 
target/linux/generic/patches-3.10/352-mips-mainline-linux-doesnt-have-prid_imp_mask.patch

diff --git 
a/target/linux/generic/patches-3.10/307-mips-Reimplement-get_cycles.patch 
b/target/linux/generic/patches-3.10/307-mips-Reimplement-get_cycles.patch
deleted file mode 100644
index 6a8f5b1..000
--- a/target/linux/generic/patches-3.10/307-mips-Reimplement-get_cycles.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 9c9b415c50bc298ac61412dff856eae2f54889ee Mon Sep 17 00:00:00 2001
-From: Ralf Baechle r...@linux-mips.org
-Date: Thu, 12 Sep 2013 13:47:32 +0200
-Subject: [PATCH] MIPS: Reimplement get_cycles().
-
-This essentially reverts commit efb9ca08b5a2374b29938cdcab417ce4feb14b54
-(kernel.org) / 58020a106879a8b372068741c81f0015c9b0b96dbv [[MIPS] Change
-get_cycles to always return 0.]
-
-Most users of get_cycles() invoke it as a timing interface.  That's why
-in modern kernels it was never very much missed for.  /dev/random however
-uses get_cycles() in the how the jitter in the interrupt timing contains
-some useful entropy.
-
-Signed-off-by: Ralf Baechle r...@linux-mips.org

- arch/mips/include/asm/timex.h |   33 -
- 1 file changed, 32 insertions(+), 1 deletion(-)
-
 a/arch/mips/include/asm/timex.h
-+++ b/arch/mips/include/asm/timex.h
-@@ -10,6 +10,7 @@
- 
- #ifdef __KERNEL__
- 
-+#include asm/cpu-features.h
- #include asm/mipsregs.h
- 
- /*
-@@ -33,9 +34,38 @@
- 
- typedef unsigned int cycles_t;
- 
-+/*
-+ * On R4000/R4400 before version 5.0 an erratum exists such that if the
-+ * cycle counter is read in the exact moment that it is matching the
-+ * compare register, no interrupt will be generated.
-+ *
-+ * There is a suggested workaround and also the erratum can't strike if
-+ * the compare interrupt isn't being used as the clock source device.
-+ * However for now the implementaton of this function doesn't get these
-+ * fine details right.
-+ */
- static inline cycles_t get_cycles(void)
- {
--  return 0;
-+  switch (cpu_data[0].cputype) {
-+  case CPU_R4400PC:
-+  case CPU_R4400SC:
-+  case CPU_R4400MC:
-+  if ((read_c0_prid()  0xff) = 0x0050)
-+  return read_c0_count();
-+  break;
-+
-+case CPU_R4000PC:
-+case CPU_R4000SC:
-+case CPU_R4000MC:
-+  break;
-+
-+  default:
-+  if (cpu_has_counter)
-+  return read_c0_count();
-+  break;
-+  }
-+
-+  return 0;   /* no usable counter */
- }
- 
- #endif /* __KERNEL__ */
diff --git 
a/target/linux/generic/patches-3.10/350-random-allow-architectures-to-optionally-define-rand.patch
 
b/target/linux/generic/patches-3.10/350-random-allow-architectures-to-optionally-define-rand.patch
new file mode 100644
index 000..c2d2e1c
--- /dev/null
+++ 
b/target/linux/generic/patches-3.10/350-random-allow-architectures-to-optionally-define-rand.patch
@@ -0,0 +1,90 @@
+From e4e35c9ea9893df758bb24a0027f018a5427e39d Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o ty...@mit.edu
+Date: Sat, 21 Sep 2013 13:58:22 -0400
+Subject: [PATCH 1/2] random: allow architectures to optionally define
+ random_get_entropy()
+
+Allow architectures which have a disabled get_cycles() function to
+provide a random_get_entropy() function which provides a fine-grained,
+rapidly changing counter that can be used by the /dev/random driver.
+
+For example, an architecture might have a rapidly changing register
+used to control random TLB cache eviction, or DRAM refresh that
+doesn't meet the requirements of get_cycles(), but which is good
+enough for the needs of the random driver.
+
+Signed-off-by: Theodore Ts'o ty...@mit.edu
+Cc: sta...@vger.kernel.org
+---
+ drivers/char/random.c |8 
+ include/linux/timex.h |   14 ++
+ 2 files changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/char/random.c b/drivers/char/random.c
+index 81eefa1..5c4626a 100644
+--- a/drivers/char/random.c
 b/drivers/char/random.c
+@@ -643,7 +643,7 @@ struct timer_rand_state {
+  */
+ void 

[OpenWrt-Devel] [PATCH] Fix unaligned access hacks for tcp timestamps

2014-02-18 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

This missing bit of the hack saves hugely on instruction traps
on tcp connections to ar71xx based routers.
---
 .../patches-3.10/902-unaligned_access_hacks.patch  |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch 
b/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch
index a0b5824..4144d45 100644
--- a/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch
@@ -884,9 +884,11 @@
options++;
} else
tpi-seq = 0;
+diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
+index e15d330..c6496eb 100644
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -3625,14 +3625,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3625,14 +3625,16 @@ static bool tcp_parse_aligned_timestamp(struct 
tcp_sock *tp, const struct tcphdr
  {
const __be32 *ptr = (const __be32 *)(th + 1);
  
@@ -900,8 +902,9 @@
 -  tp-rx_opt.rcv_tsval = ntohl(*ptr);
 +  tp-rx_opt.rcv_tsval = get_unaligned_be32(ptr);
++ptr;
-   if (*ptr)
+-  if (*ptr)
 -  tp-rx_opt.rcv_tsecr = ntohl(*ptr) - tp-tsoffset;
++  if (net_hdr_word(ptr))
 +  tp-rx_opt.rcv_tsecr = get_unaligned_be32(ptr) -
 + tp-tsoffset;
else
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 6/8] net-next: respect RA messages better

2012-10-01 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

---
 ...-RTPROT_RA-markup-of-RA-routes-w-nexthops.patch |   55 
 1 file changed, 55 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.3/051-ipv6-fix-RTPROT_RA-markup-of-RA-routes-w-nexthops.patch

diff --git 
a/target/linux/generic/patches-3.3/051-ipv6-fix-RTPROT_RA-markup-of-RA-routes-w-nexthops.patch
 
b/target/linux/generic/patches-3.3/051-ipv6-fix-RTPROT_RA-markup-of-RA-routes-w-nexthops.patch
new file mode 100644
index 000..73b832a
--- /dev/null
+++ 
b/target/linux/generic/patches-3.3/051-ipv6-fix-RTPROT_RA-markup-of-RA-routes-w-nexthops.patch
@@ -0,0 +1,55 @@
+From patchwork Tue Jul 10 14:45:50 2012
+Content-Type: text/plain; charset=utf-8
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: ipv6: fix RTPROT_RA markup of RA routes w/nexthops
+Date: Tue, 10 Jul 2012 04:45:50 -
+From: Denis Ovsienko infrastat...@yandex.ru
+X-Patchwork-Id: 170201
+Message-Id: 20120710184550.7a5a8d89802473b4c28d0...@yandex.ru
+To: net...@vger.kernel.org
+
+From: Denis Ovsienko infrastat...@yandex.ru
+
+Userspace implementations of network routing protocols sometimes need to
+tell RA-originated IPv6 routes from other kernel routes to make proper
+routing decisions. This makes most sense for RA routes with nexthops,
+namely, default routes and Route Information routes.
+
+The intended mean of preserving RA route origin in a netlink message is
+through indicating RTPROT_RA as protocol code. Function rt6_fill_node()
+tried to do that for default routes, but its test condition was taken
+wrong. This change is modeled after the original mailing list posting
+by Jeff Haran. It fixes the test condition for default route case and
+sets the same behaviour for Route Information case (both types use
+nexthops). Handling of the 3rd RA route type, Prefix Information, is
+left unchanged, as it stands for interface connected routes (without
+nexthops).
+
+Signed-off-by: Denis Ovsienko infrastat...@yandex.ru
+
+---
+net/ipv6/route.c |   10 ++
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/net/ipv6/route.c b/net/ipv6/route.c
+index 999a982..238b1ee 100644
+--- a/net/ipv6/route.c
 b/net/ipv6/route.c
+@@ -2440,10 +2440,12 @@ static int rt6_fill_node(struct net *net,
+   rtm-rtm_protocol = rt-rt6i_protocol;
+   if (rt-rt6i_flags  RTF_DYNAMIC)
+   rtm-rtm_protocol = RTPROT_REDIRECT;
+-  else if (rt-rt6i_flags  RTF_ADDRCONF)
+-  rtm-rtm_protocol = RTPROT_KERNEL;
+-  else if (rt-rt6i_flags  RTF_DEFAULT)
+-  rtm-rtm_protocol = RTPROT_RA;
++  else if (rt-rt6i_flags  RTF_ADDRCONF) {
++  if (rt-rt6i_flags  (RTF_DEFAULT | RTF_ROUTEINFO))
++  rtm-rtm_protocol = RTPROT_RA;
++  else
++  rtm-rtm_protocol = RTPROT_KERNEL;
++  }
+ 
+   if (rt-rt6i_flags  RTF_CACHE)
+   rtm-rtm_flags |= RTM_F_CLONED;
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/8] fq_codel: dont reinit flow state

2012-10-01 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

Keep fq_codel flow state around after queue empty.
---
 .../052-fq_codel-dont-reinit-flow-state.patch  |   41 
 1 file changed, 41 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.3/052-fq_codel-dont-reinit-flow-state.patch

diff --git 
a/target/linux/generic/patches-3.3/052-fq_codel-dont-reinit-flow-state.patch 
b/target/linux/generic/patches-3.3/052-fq_codel-dont-reinit-flow-state.patch
new file mode 100644
index 000..2e6b219
--- /dev/null
+++ b/target/linux/generic/patches-3.3/052-fq_codel-dont-reinit-flow-state.patch
@@ -0,0 +1,41 @@
+From b379135c40163ae79ba7a54e6928b53983e74ee8 Mon Sep 17 00:00:00 2001
+From: Eric Dumazet eric.duma...@gmail.com
+Date: Sat, 1 Sep 2012 03:19:57 +
+Subject: [PATCH 307/558] fq_codel: dont reinit flow state
+
+When fq_codel builds a new flow, it should not reset codel state.
+
+Codel algo needs to get previous values (lastcount, drop_next) to get
+proper behavior.
+
+Signed-off-by: Dave Taht dave.t...@gmail.com
+Signed-off-by: Eric Dumazet eduma...@google.com
+Acked-by: Dave Taht dave.t...@bufferbloat.net
+Signed-off-by: David S. Miller da...@davemloft.net
+---
+ net/sched/sch_fq_codel.c |2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
+index 9fc1c62..4e606fc 100644
+--- a/net/sched/sch_fq_codel.c
 b/net/sched/sch_fq_codel.c
+@@ -191,7 +191,6 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct 
Qdisc *sch)
+ 
+   if (list_empty(flow-flowchain)) {
+   list_add_tail(flow-flowchain, q-new_flows);
+-  codel_vars_init(flow-cvars);
+   q-new_flow_count++;
+   flow-deficit = q-quantum;
+   flow-dropped = 0;
+@@ -418,6 +417,7 @@ static int fq_codel_init(struct Qdisc *sch, struct nlattr 
*opt)
+   struct fq_codel_flow *flow = q-flows + i;
+ 
+   INIT_LIST_HEAD(flow-flowchain);
++  codel_vars_init(flow-cvars);
+   }
+   }
+   if (sch-limit = 1)
+-- 
+1.7.9.5
+
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/8] fq_codel: dont remove dropped statistic on empty queue

2012-10-01 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

dropped statistic is useful if retained.
---
 ...56-fq_codel-dont-remove-dropped-statistic.patch |   24 
 1 file changed, 24 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.3/056-fq_codel-dont-remove-dropped-statistic.patch

diff --git 
a/target/linux/generic/patches-3.3/056-fq_codel-dont-remove-dropped-statistic.patch
 
b/target/linux/generic/patches-3.3/056-fq_codel-dont-remove-dropped-statistic.patch
new file mode 100644
index 000..4491a67
--- /dev/null
+++ 
b/target/linux/generic/patches-3.3/056-fq_codel-dont-remove-dropped-statistic.patch
@@ -0,0 +1,24 @@
+From 0bca85ea6c06392e4ca04ebd7270cb567d8ebfb4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dave=20T=C3=A4ht?= dave.t...@bufferbloat.net
+Date: Mon, 17 Sep 2012 18:03:15 -0700
+Subject: [PATCH 710/712] fq_codel: dont remove dropped statistic
+
+---
+ net/sched/sch_fq_codel.c |1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
+index 4e606fc..ba944bd 100644
+--- a/net/sched/sch_fq_codel.c
 b/net/sched/sch_fq_codel.c
+@@ -193,7 +193,6 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct 
Qdisc *sch)
+   list_add_tail(flow-flowchain, q-new_flows);
+   q-new_flow_count++;
+   flow-deficit = q-quantum;
+-  flow-dropped = 0;
+   }
+   if (++sch-q.qlen  sch-limit)
+   return NET_XMIT_SUCCESS;
+-- 
+1.7.9.5
+
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Multiple patches Best of Cerowrt

2012-10-01 Thread Dave Täht
The patch set following is the Best of what is in cerowrt.
Of these, the only patch that I think is crucial to the openwrt
freeze is the qos-scripts one...

... and it could use a bit more work!

The remainder have been in cero for a while, and could at the
very least, use some eyeballs on them. The reduce_truesize
patches were suggested by Eric Dumazet, in particular, and
help on multiple SSIDs and larger txqueuelens.

(A core difference
between cero and current openwrt, is that openwrt runs with
a txqueuelen of 30 pfifo_fast, and cero runs fq_codel on everything
with a packet limit of 1000)


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/8] Reduce skb truesize on common qdiscs under load

2012-10-01 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

After queue lengths start getting out of hand, try to preserve memory
by shortening skbs to their truesize on the common pfifo, codel, and
fq_codel qdiscs.

Arguably (128) should be a configureable param
---
 ..._reduce_truesize-support-to-common-qdiscs.patch |   73 
 1 file changed, 73 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.3/057-net-add-skb_reduce_truesize-support-to-common-qdiscs.patch

diff --git 
a/target/linux/generic/patches-3.3/057-net-add-skb_reduce_truesize-support-to-common-qdiscs.patch
 
b/target/linux/generic/patches-3.3/057-net-add-skb_reduce_truesize-support-to-common-qdiscs.patch
new file mode 100644
index 000..d80e4ac
--- /dev/null
+++ 
b/target/linux/generic/patches-3.3/057-net-add-skb_reduce_truesize-support-to-common-qdiscs.patch
@@ -0,0 +1,73 @@
+From 341cca736cb9a991069d6ad4f819241161936f47 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dave=20T=C3=A4ht?= dave.t...@bufferbloat.net
+Date: Mon, 17 Sep 2012 19:20:22 -0700
+Subject: [PATCH 711/712] net: add skb_reduce_truesize support to common
+ qdiscs
+
+Reduce skb size under load when queues begin to fill on the
+common qdiscs.
+---
+ net/sched/sch_codel.c|2 ++
+ net/sched/sch_fifo.c |   12 
+ net/sched/sch_fq_codel.c |2 ++
+ 3 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c
+index 2f9ab17..12d9363c 100644
+--- a/net/sched/sch_codel.c
 b/net/sched/sch_codel.c
+@@ -96,6 +96,8 @@ static int codel_qdisc_enqueue(struct sk_buff *skb, struct 
Qdisc *sch)
+   struct codel_sched_data *q;
+ 
+   if (likely(qdisc_qlen(sch)  sch-limit)) {
++  if(qdisc_qlen(sch)  128)
++  skb = skb_reduce_truesize(skb);
+   codel_set_enqueue_time(skb);
+   return qdisc_enqueue_tail(skb, sch);
+   }
+diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c
+index 66effe2..2031a3e 100644
+--- a/net/sched/sch_fifo.c
 b/net/sched/sch_fifo.c
+@@ -29,17 +29,21 @@ static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc 
*sch)
+ 
+ static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch)
+ {
+-  if (likely(skb_queue_len(sch-q)  sch-limit))
++  if (likely(skb_queue_len(sch-q)  sch-limit)) {
++  if (skb_queue_len(sch-q)  128)
++  skb = skb_reduce_truesize(skb);
+   return qdisc_enqueue_tail(skb, sch);
+-
++  }
+   return qdisc_reshape_fail(skb, sch);
+ }
+ 
+ static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch)
+ {
+-  if (likely(skb_queue_len(sch-q)  sch-limit))
++  if (likely(skb_queue_len(sch-q)  sch-limit)) {
++  if (skb_queue_len(sch-q)  128)
++  skb = skb_reduce_truesize(skb);
+   return qdisc_enqueue_tail(skb, sch);
+-
++  }
+   /* queue full, remove one skb to fulfill the limit */
+   __qdisc_queue_drop_head(sch, sch-q);
+   sch-qstats.drops++;
+diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
+index ba944bd..136d2bc 100644
+--- a/net/sched/sch_fq_codel.c
 b/net/sched/sch_fq_codel.c
+@@ -182,6 +182,8 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct 
Qdisc *sch)
+   return ret;
+   }
+   idx--;
++  if (sch-q.qlen  128)
++  skb = skb_reduce_truesize(skb);
+ 
+   codel_set_enqueue_time(skb);
+   flow = q-flows[idx];
+-- 
+1.7.9.5
+
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 7/8] mac80211: add full diffserv support to wireless

2012-10-01 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

This moves all but EF marked traffic out of the VO queue,
allowing for aggregation of other forms of traffic.

It more aggressively uses the VI queue for interactive-ish
traffic.
---
 ...901-Add-full-diffserv-support-to-wireless.patch |  126 
 1 file changed, 126 insertions(+)
 create mode 100644 
package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch

diff --git 
a/package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch 
b/package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch
new file mode 100644
index 000..7c19e05
--- /dev/null
+++ b/package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch
@@ -0,0 +1,126 @@
+From 12b7c8b3cb5750f58e560076b93d3a0af1d70e09 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dave=20T=C3=A4ht?= dave.t...@bufferbloat.net
+Date: Sun, 8 Jul 2012 14:38:32 -0400
+Subject: [PATCH] Add full diffserv support to wireless
+
+The previous dscp scheme in linux wireless only respected the topmost
+3 diffserv priority bits (e.g. CS0 through CS7). This patch respects
+all the diffserv bits and all the old-style tos bits that make sense.
+
+It moves all but EF marked traffic out of the VO queue, where CS6 and
+CS7 have been going.
+
+The imm bit (set by ssh) now moves to VI
+Background goes to BK
+Most other (obsolete) options move into VI, notably CS6 and CS7 traffic.
+
+Sort of in keeping with the 802.1q spirit, but not along the actual
+performance of 802.1q, the queues are marked with the range 0-7.
+---
+ net/wireless/util.c |   73 +--
+ 1 file changed, 71 insertions(+), 2 deletions(-)
+
+diff --git a/net/wireless/util.c b/net/wireless/util.c
+index 316cfd0..304a6c7 100644
+--- a/net/wireless/util.c
 b/net/wireless/util.c
+@@ -12,6 +12,8 @@
+ #include net/dsfield.h
+ #include core.h
+ 
++/* VI, VO, BE, BK */
++
+ struct ieee80211_rate *
+ ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
+   u32 basic_rates, int bitrate)
+@@ -635,10 +637,77 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, 
struct sk_buff_head *list,
+ }
+ EXPORT_SYMBOL(ieee80211_amsdu_to_8023s);
+ 
++static u8 dscp_table[] = {
++   0, /* BE = 0x0 */
++   0, /* Max-Reliability = 0x1 */
++   3, /* Max-Throughput = 0x2 */
++   0, /* 0x3 Undefined */
++   5, /* Min-Delay = 0x4 */
++   0, /* 0x5 Undefined */
++   0, /* 0x6 Undefined */
++   0, /* 0x7 Undefined */
++   1, /* CS1 = 0x8 */
++   0, /* 0x9 Undefined */
++   3, /* AF11 = 0xa */
++   0, /* 0xb Undefined */
++   3, /* AF12 = 0xc */
++   0, /* 0xd Undefined */
++   3, /* AF13 = 0xe */
++   0, /* 0xf Undefined */
++   2, /* CS2 = 0x10 */
++   0, /* 0x11 Undefined */
++   3, /* AF21 = 0x12 */
++   0, /* 0x13 Undefined */
++   3, /* AF22 = 0x14 */
++   0, /* 0x15 Undefined */
++   3, /* AF23 = 0x16 */
++   0, /* 0x17 Undefined */
++   4, /* CS3 = 0x18 */
++   0, /* 0x19 Undefined */
++   3, /* AF31 = 0x1a */
++   0, /* 0x1b Undefined */
++   3, /* AF32 = 0x1c */
++   0, /* 0x1d Undefined */
++   3, /* AF33 = 0x1e */
++   0, /* 0x1f Undefined */
++   5, /* CS4 = 0x20 */
++   0, /* 0x21 Undefined */
++   5, /* AF41 = 0x22 */
++   0, /* 0x23 Undefined */
++   5, /* AF42 = 0x24 */
++   0, /* 0x25 Undefined */
++   4, /* AF43 = 0x26 */
++   0, /* 0x27 Undefined */
++   5, /* CS5 = 0x28 */
++   0, /* 0x29 Undefined */
++   0, /* 0x2a Undefined */
++   0, /* 0x2b Undefined */
++   4, /* VA = 0x2c */
++   0, /* 0x2d Undefined */
++   6, /* EF = 0x2e */
++   0, /* 0x2f Undefined */
++   5, /* CS6 = 0x30 */
++   0, /* 0x31 Undefined */
++   0, /* 0x32 Undefined */
++   0, /* 0x33 Undefined */
++   0, /* 0x34 Undefined */
++   0, /* 0x35 Undefined */
++   0, /* 0x36 Undefined */
++   0, /* 0x37 Undefined */
++   5, /* CS7 = 0x38 */
++   0, /* 0x39 Undefined */
++   0, /* 0x3a Undefined */
++   0, /* 0x3b Undefined */
++   0, /* 0x3c Undefined */
++   0, /* 0x3d Undefined */
++   0, /* 0x3e Undefined */
++   0, /* 0x3f Undefined */
++};
++
+ /* Given a data frame determine the 802.1p/1d tag to use. */
+ unsigned int cfg80211_classify8021d(struct sk_buff *skb)
+ {
+-  unsigned int dscp;
++  unsigned char dscp;
+ 
+   /* skb-priority values from 256-263 are magic values to
+* directly indicate a specific 802.1d priority.  This is used
+@@ -659,7 +728,7 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb)
+   return 0;
+   }
+ 
+-  return dscp  5;
++  return (dscp_table[dscp2]);
+ }
+ EXPORT_SYMBOL(cfg80211_classify8021d);
+ 
+-- 
+1.7.9.5
+
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org

[OpenWrt-Devel] [PATCH 1/8] net-next: dont delay acks after ECN CE

2012-10-01 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

Bugfix from linux head - don't delay acks from ECN congestion
experienced in some situations.
---
 ...net-next-tcp-ecn-dont-delay-ACKS-after-CE.patch |   63 
 1 file changed, 63 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.3/050-net-next-tcp-ecn-dont-delay-ACKS-after-CE.patch

diff --git 
a/target/linux/generic/patches-3.3/050-net-next-tcp-ecn-dont-delay-ACKS-after-CE.patch
 
b/target/linux/generic/patches-3.3/050-net-next-tcp-ecn-dont-delay-ACKS-after-CE.patch
new file mode 100644
index 000..547e4fa
--- /dev/null
+++ 
b/target/linux/generic/patches-3.3/050-net-next-tcp-ecn-dont-delay-ACKS-after-CE.patch
@@ -0,0 +1,63 @@
+From patchwork Mon Aug  6 21:04:43 2012
+Content-Type: text/plain; charset=utf-8
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [net-next] tcp: ecn: dont delay ACKS after CE
+Date: Mon, 06 Aug 2012 11:04:43 -
+From: Eric Dumazet eric.duma...@gmail.com
+X-Patchwork-Id: 175453
+Message-Id: 1344287083.26674.83.camel@edumazet-glaptop
+To: David Miller da...@davemloft.net
+Cc: netdev net...@vger.kernel.org,
+   Neal Cardwell ncardw...@google.com
+
+From: Eric Dumazet eduma...@google.com
+
+While playing with CoDel and ECN marking, I discovered a
+non optimal behavior of receiver of CE (Congestion Encountered)
+segments.
+
+In pathological cases, sender has reduced its cwnd to low values,
+and receiver delays its ACK (by 40 ms).
+
+While RFC 3168 6.1.3 (The TCP Receiver) doesn't explicitly recommend
+to send immediate ACKS, we believe its better to not delay ACKS, because
+a CE segment should give same signal than a dropped segment, and its
+quite important to reduce RTT to give ECE/CWR signals as fast as
+possible.
+
+Note we already call tcp_enter_quickack_mode() from TCP_ECN_check_ce()
+if we receive a retransmit, for the same reason.
+
+Signed-off-by: Eric Dumazet eduma...@google.com
+Cc: Neal Cardwell ncardw...@google.com
+Acked-by: Neal Cardwell ncardw...@google.com
+
+---
+net/ipv4/tcp_input.c |6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+
+
+--
+To unsubscribe from this list: send the line unsubscribe netdev in
+the body of a message to majord...@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
+index 2fd2bc9..fa2c2c2 100644
+--- a/net/ipv4/tcp_input.c
 b/net/ipv4/tcp_input.c
+@@ -237,7 +237,11 @@ static inline void TCP_ECN_check_ce(struct tcp_sock *tp, 
const struct sk_buff *s
+   tcp_enter_quickack_mode((struct sock *)tp);
+   break;
+   case INET_ECN_CE:
+-  tp-ecn_flags |= TCP_ECN_DEMAND_CWR;
++  if (!(tp-ecn_flags  TCP_ECN_DEMAND_CWR)) {
++  /* Better not delay acks, sender can have a very low 
cwnd */
++  tcp_enter_quickack_mode((struct sock *)tp);
++  tp-ecn_flags |= TCP_ECN_DEMAND_CWR;
++  }
+   /* fallinto */
+   default:
+   tp-ecn_flags |= TCP_ECN_SEEN;
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/8] net: add skb_reduce_truesize to reduce skbs when needed

2012-10-01 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

skb_reduce_truesize is an inline function to reduce large skbs
when needed.

The API may change before inclusion with Linux 3.7...
---
 .../054-net-add-skb_reduce_truesize.patch  |   45 
 1 file changed, 45 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.3/054-net-add-skb_reduce_truesize.patch

diff --git 
a/target/linux/generic/patches-3.3/054-net-add-skb_reduce_truesize.patch 
b/target/linux/generic/patches-3.3/054-net-add-skb_reduce_truesize.patch
new file mode 100644
index 000..73d0270
--- /dev/null
+++ b/target/linux/generic/patches-3.3/054-net-add-skb_reduce_truesize.patch
@@ -0,0 +1,45 @@
+From 7cdeef22fb3164bbb52d9fcec9186c6eda877eef Mon Sep 17 00:00:00 2001
+From: Dave Taht dave.t...@bufferbloat.net
+Date: Mon, 27 Aug 2012 10:55:45 -0700
+Subject: [PATCH 2/4] net: add skb_reduce_truesize
+
+skb_reduce_truesize is a helper function for shrinking skbs whenever
+needed.
+---
+ include/linux/skbuff.h |   21 +
+ 1 file changed, 21 insertions(+)
+
+diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
+index 42854ce..38f7bb8 100644
+--- a/include/linux/skbuff.h
 b/include/linux/skbuff.h
+@@ -2531,5 +2531,26 @@ static inline bool skb_is_recycleable(const struct 
sk_buff *skb, int skb_size)
+ 
+   return true;
+ }
++
++/*
++ * Caller wants to reduce memory needs before queueing skb
++ * The (expensive) copy should not be be done in fast path.
++ */
++
++static inline struct sk_buff *skb_reduce_truesize(struct sk_buff *skb)
++{
++   if (skb-truesize  2 * SKB_TRUESIZE(skb-len)) {
++   struct sk_buff *nskb;
++
++   nskb = skb_copy_expand(skb, skb_headroom(skb), 0,
++  GFP_ATOMIC | __GFP_NOWARN);
++   if (nskb) {
++   __kfree_skb(skb);
++   skb = nskb;
++   }
++   }
++   return skb;
++}
++
+ #endif/* __KERNEL__ */
+ #endif/* _LINUX_SKBUFF_H */
+-- 
+1.7.9.5
+
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] dnsmasq: update to 2.62

2012-06-09 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

---
 package/dnsmasq/Makefile |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile
index 10f1806..26f5a61 100644
--- a/package/dnsmasq/Makefile
+++ b/package/dnsmasq/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
-PKG_VERSION:=2.59
+PKG_VERSION:=2.62
 PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
-PKG_MD5SUM:=b5757ef2d7b651748eeebb88af29d7d6
+PKG_MD5SUM:=f47e5cb8f5bac6343f24b2dbe317ab40
 
 PKG_INSTALL:=1
 
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] Switch openwrt default to TCP cubic from westwood

2012-06-09 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

Despite Westwood's theoretical advantages, in nearly
every benchmark we ran last year, TCP cubic won, whether it be
on correct RTT estimates, amount of buffering, responsiveness,
etc. on current hardware and software designs.

(both need timestamps on to work well, besides)

TCP cubic is better maintained and understood than westwood,
also.

While a scenario where westwood would win possibly exists,
there is too much buffering in the wifi stack in particular
at present, to see any improvement.

So this leaves westwood enabled, but no longer the default.

If you wish to exercise various TCPs under contention,
the current svn head of netperf (2.6) has options to switch
congestion control agorithms on the fly, as does iperf.
---
 target/linux/generic/config-3.3 |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/generic/config-3.3 b/target/linux/generic/config-3.3
index f98ddd6..3c4843d 100644
--- a/target/linux/generic/config-3.3
+++ b/target/linux/generic/config-3.3
@@ -575,8 +575,8 @@ CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
 # CONFIG_DEFAULT_RENO is not set
 CONFIG_DEFAULT_SECURITY=
 CONFIG_DEFAULT_SECURITY_DAC=y
-CONFIG_DEFAULT_TCP_CONG=westwood
-CONFIG_DEFAULT_WESTWOOD=y
+CONFIG_DEFAULT_TCP_CONG=cubic
+CONFIG_DEFAULT_CUBIC=y
 CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
 # CONFIG_DEPRECATED_PARAM_STRUCT is not set
 # CONFIG_DETECT_HUNG_TASK is not set
@@ -2875,7 +2875,7 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_TCIC is not set
 CONFIG_TCP_CONG_ADVANCED=y
 # CONFIG_TCP_CONG_BIC is not set
-# CONFIG_TCP_CONG_CUBIC is not set
+CONFIG_TCP_CONG_CUBIC=y
 # CONFIG_TCP_CONG_HSTCP is not set
 # CONFIG_TCP_CONG_HTCP is not set
 # CONFIG_TCP_CONG_HYBLA is not set
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] Enable TCP timestamps. Enable sack/dsack. Enable ECN if offered

2012-06-09 Thread Dave Täht
From: Dave Taht dave.t...@bufferbloat.net

A year of testing in the cerowrt project shows not using timestamps
to be a very bad idea in nearly any TCP at speeds above a few Mbit.

As FQ_CODEL will actually assert ECT(3) on ECN streams, it is useful
to have ECN be negotiated when offered. In this day and age it
could also be hoped that ECN could merely be one by default, but...

Lastly sack/dsack help on recovery from larger amounts of packet
loss.
---
 package/base-files/files/etc/sysctl.conf |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/base-files/files/etc/sysctl.conf 
b/package/base-files/files/etc/sysctl.conf
index 2d97000..0aa0588 100644
--- a/package/base-files/files/etc/sysctl.conf
+++ b/package/base-files/files/etc/sysctl.conf
@@ -4,11 +4,13 @@ net.ipv4.conf.all.arp_ignore=1
 net.ipv4.ip_forward=1
 net.ipv4.icmp_echo_ignore_broadcasts=1
 net.ipv4.icmp_ignore_bogus_error_responses=1
-net.ipv4.tcp_ecn=0
+net.ipv4.tcp_ecn=2
 net.ipv4.tcp_fin_timeout=30
 net.ipv4.tcp_keepalive_time=120
 net.ipv4.tcp_syncookies=1
-net.ipv4.tcp_timestamps=0
+net.ipv4.tcp_timestamps=1
+net.ipv4.tcp_sack=1
+net.ipv4.tcp_dsack=1
 
 net.ipv4.netfilter.ip_conntrack_checksum=0
 net.ipv4.netfilter.ip_conntrack_max=16384
-- 
1.7.9.5

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] IPv6: Add support for domain name distribution via RA messages

2012-06-09 Thread Dave Täht
Backport from Kernel 3.5
---
 ...at-ND-option-31-as-userland-DNSSL-support.patch |   53 
 1 files changed, 53 insertions(+), 0 deletions(-)
 create mode 100644 
target/linux/generic/patches-3.3/050-Treat-ND-option-31-as-userland-DNSSL-support.patch

diff --git 
a/target/linux/generic/patches-3.3/050-Treat-ND-option-31-as-userland-DNSSL-support.patch
 
b/target/linux/generic/patches-3.3/050-Treat-ND-option-31-as-userland-DNSSL-support.patch
new file mode 100644
index 000..c2f68fc
--- /dev/null
+++ 
b/target/linux/generic/patches-3.3/050-Treat-ND-option-31-as-userland-DNSSL-support.patch
@@ -0,0 +1,53 @@
+From 86a53286bb9933244a86a684c68ee1ccb32bd53e Mon Sep 17 00:00:00 2001
+From: Alexey I. Froloff ra...@raorn.name
+Date: Fri, 6 Apr 2012 05:50:58 +
+Subject: [PATCH] Treat ND option 31 as userland (DNSSL support)
+
+As specified in RFC6106, DNSSL option contains one or more domain names
+of DNS suffixes.  8-bit identifier of the DNSSL option type as assigned
+by the IANA is 31.  This option should also be treated as userland.
+
+Signed-off-by: Alexey I. Froloff ra...@raorn.name
+Signed-off-by: David S. Miller da...@davemloft.net
+---
+ include/net/ndisc.h |1 +
+ net/ipv6/ndisc.c|4 +++-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/include/net/ndisc.h b/include/net/ndisc.h
+index e3133c2..a9d350e 100644
+--- a/include/net/ndisc.h
 b/include/net/ndisc.h
+@@ -34,6 +34,7 @@ enum {
+   __ND_OPT_ARRAY_MAX,
+   ND_OPT_ROUTE_INFO = 24, /* RFC4191 */
+   ND_OPT_RDNSS = 25,  /* RFC5006 */
++  ND_OPT_DNSSL = 31,  /* RFC6106 */
+   __ND_OPT_MAX
+ };
+ 
+diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
+index c964958..b103252 100644
+--- a/net/ipv6/ndisc.c
 b/net/ipv6/ndisc.c
+@@ -15,6 +15,7 @@
+ /*
+  *Changes:
+  *
++ *Alexey I. Froloff   :   RFC6106 (DNSSL) support
+  *Pierre Ynard:   export userland ND options
+  *through netlink (RDNSS support)
+  *Lars Fenneberg  :   fixed MTU setting on receipt
+@@ -228,7 +229,8 @@ static struct nd_opt_hdr *ndisc_next_option(struct 
nd_opt_hdr *cur,
+ 
+ static inline int ndisc_is_useropt(struct nd_opt_hdr *opt)
+ {
+-  return opt-nd_opt_type == ND_OPT_RDNSS;
++  return opt-nd_opt_type == ND_OPT_RDNSS ||
++  opt-nd_opt_type == ND_OPT_DNSSL;
+ }
+ 
+ static struct nd_opt_hdr *ndisc_next_useropt(struct nd_opt_hdr *cur,
+-- 
+1.7.1
+
-- 
1.7.1

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] __packed can leak from the kernel headers into iptables so define

2012-04-22 Thread Dave Täht
With the upcoming ag71xx patch the __packed attribute can leak
into the rest of the build, and iptables does not have it defined.

This defines it.
---
 package/iptables/patches/900-packed.patch |   28 
 1 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100644 package/iptables/patches/900-packed.patch

diff --git a/package/iptables/patches/900-packed.patch 
b/package/iptables/patches/900-packed.patch
new file mode 100644
index 000..3442f26
--- /dev/null
+++ b/package/iptables/patches/900-packed.patch
@@ -0,0 +1,28 @@
+diff --git a/include/iptables.h b/include/iptables.h
+index c42613c..4ae9298 100644
+--- a/include/iptables.h
 b/include/iptables.h
+@@ -5,6 +5,9 @@
+ #include xtables.h
+ #include libiptc/libiptc.h
+ #include iptables/internal.h
++#ifndef __packed
++#define  __packed __attribute__((packed))
++#endif
+ 
+ /* Your shared library should call one of these. */
+ extern int do_command4(int argc, char *argv[], char **table,
+diff --git a/include/xtables.h.in b/include/xtables.h.in
+index 28e2933..03081bb 100644
+--- a/include/xtables.h.in
 b/include/xtables.h.in
+@@ -5,6 +5,9 @@
+  * Changing any structs/functions may incur a needed change
+  * in libxtables_vcurrent/vage too.
+  */
++#ifndef __packed
++#define __packed __attribute__((packed))
++#endif
+ 
+ #include sys/socket.h /* PF_* */
+ #include sys/types.h
-- 
1.7.1

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel