Re: [OpenWrt-Devel] [PATCH] [package] iproute2: Add hotplug script to add slave devices to TEQL master

2012-03-28 Thread Dave Taht
On Wed, Mar 28, 2012 at 3:36 PM, David Woodhouse dw...@infradead.orgwrote:

 Resolves https://dev.openwrt.org/ticket/11192

 You can now configure devices to be used as a TEQL slave as follows:
 # uci set network.ppp0.teql=teql0
 # uci set network.ppp1.teql=teql0
 # uci commit


I am pretty intensely curious as to how the debloating stuff is going to
work
with bonded adsl lines.



 I have teql0 configured as a normal device, and this script
 automatically adds the PPP devices when they come up — giving me load
 balancing across both ADSL lines.


Can I convince you to try some new sfq and sfqred stuff for load
optimization
on those lines?

Signed-off-by: David Woodhouse dw...@infradead.org
 ---
  package/iproute2/Makefile  |2 ++
  package/iproute2/files/30-teql |   23 +++
  2 files changed, 25 insertions(+), 0 deletions(-)
  create mode 100644 package/iproute2/files/30-teql

 diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile
 index 38e493a..97614be 100644
 --- a/package/iproute2/Makefile
 +++ b/package/iproute2/Makefile
 @@ -92,6 +92,8 @@ endef
  define Package/tc/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/
 +   $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
 +   $(INSTALL_BIN) ./files/30-teql $(1)/etc/hotplug.d/iface/
  endef

  define Package/genl/install
 diff --git a/package/iproute2/files/30-teql
 b/package/iproute2/files/30-teql
 new file mode 100644
 index 000..231c09f
 --- /dev/null
 +++ b/package/iproute2/files/30-teql
 @@ -0,0 +1,23 @@
 +#!/bin/sh
 +
 +. /etc/functions.sh
 +
 +if [ $ACTION != ifup ]; then
 +   exit
 +fi
 +
 +config_load network
 +
 +config_get teql $INTERFACE teql
 +
 +if [ $teql !=  ]; then
 +logger Adding device $DEVICE to TEQL master $teql
 +insmod sch_teql
 +tc qdisc add dev $DEVICE root $teql
 +
 +# The kernel doesn't let us bring it up until it has at least one
 +# slave. So bring it up now, if it isn't already.
 +if ! cat /sys/class/net/$teql/carrier /dev/null; then
 +ifup $teql 
 +fi
 +fi
 --
 1.7.7.6


 --
 dwmw2

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




-- 
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
http://www.bufferbloat.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [package] iproute2: Add hotplug script to add slave devices to TEQL master

2012-03-28 Thread David Woodhouse
On Wed, 2012-03-28 at 16:29 -0700, Dave Taht wrote:
 On Wed, Mar 28, 2012 at 3:36 PM, David Woodhouse dw...@infradead.orgwrote:
 
  Resolves https://dev.openwrt.org/ticket/11192
 
  You can now configure devices to be used as a TEQL slave as follows:
  # uci set network.ppp0.teql=teql0
  # uci set network.ppp1.teql=teql0
  # uci commit
 
 
 I am pretty intensely curious as to how the debloating stuff is going to
 work with bonded adsl lines.

If you apply your SFQ qdisc to the 'teql0' interface, it should be
fairly much identical. The upstream packets are sent over both
interfaces, in an alternating fashion — but apart from the occasional
reordering of packets it's not really that different to having a single
line with double the bandwidth.

Speaking of bloat, I noticed that there's a *huge* hidden queue of
outbound packets on each PPPoATM interface. It'll buffer up to the
socket send buffer (/proc/sys/net/core/wmem_default) between the generic
PPP core and the ATM device. That's 160KiB on my system. Per interface.
Fixed by http://marc.info/?l=linux-netdevm=133287553017193w=2

  I have teql0 configured as a normal device, and this script
  automatically adds the PPP devices when they come up — giving me load
  balancing across both ADSL lines.
 
 
 Can I convince you to try some new sfq and sfqred stuff for load
 optimization on those lines?

Perhaps, but having instrumented the queue depths carefully for testing
the above patch, I can tell you that I almost never see more than one
packet in the uplink queue. I've only been able to stress the queueing
with 'ping -l 100'; not any realistic workload. Under normal operation,
I don't even have a second packet in the queue for the ADSL modem to
send in its TX done IRQ. It has to let the line go idle and wait for
something new to come in. Perhaps you just need to remind me what I
should be using as a test case? :)

Do you have scripts which automatically apply schedulers to interfaces
based on the network configuration (like I'm doing here for TEQL)?

-- 
dwmw2


smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel