diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2009-11-17 15:36:29 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2009-11-17 15:36:29 -0800 |
commit | 69d6401b0875cc8ff6d50fb2ea720c05a4cb6a57 (patch) | |
tree | adb444d5461511b5d6e11132735b2e18ac2f1fcd | |
parent | 3d1156451cb581c7a2070e8d8c827a7348cc7c05 (diff) | |
download | vyatta-cfg-69d6401b0875cc8ff6d50fb2ea720c05a4cb6a57.tar.gz vyatta-cfg-69d6401b0875cc8ff6d50fb2ea720c05a4cb6a57.zip |
Workaround 5100: Disable TSO on NICs using the igb driver.
Packets forwarded by NICs using the igb driver are corrupted when
TSO is enabled. It appears that a train of back-to-back packets from the
same flow coalesced by LRO are not correctly re-generated by TSO. This
workaround prevents the problem by disabling TSO.
This problem does not occur in the Kenwood code base, so this workaround
should NOT be merged forward to Kenwood.
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | debian/vyatta-cfg.postinst.in | 1 | ||||
-rw-r--r-- | etc/init.d/vyatta-no-tso | 36 |
3 files changed, 38 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index f7096af..f8891ca 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,6 +13,7 @@ AM_LFLAGS = --prefix=yy_`basename $* .l`_ -olex.yy.c completion_SCRIPTS = etc/bash_completion.d/20vyatta-cfg initd_SCRIPTS = etc/init.d/vyatta-ofr +initd_SCRIPTS += etc/init.d/vyatta-no-tso dhcphook_SCRIPTS = scripts/vyatta-dhclient-hook modprobe_SCRIPTS = etc/modprobe.d/vyatta_nocopybreak diff --git a/debian/vyatta-cfg.postinst.in b/debian/vyatta-cfg.postinst.in index 9237df4..1a18357 100644 --- a/debian/vyatta-cfg.postinst.in +++ b/debian/vyatta-cfg.postinst.in @@ -7,6 +7,7 @@ mkdir -m 0775 -p $sysconfdir/config $prefix/config chgrp vyattacfg $sysconfdir/config $prefix/config 2>/dev/null update-rc.d vyatta-ofr defaults 90 >/dev/null +update-rc.d vyatta-no-tso defaults 91 >/dev/null # do we want to start vyatta-ofr here in postinst? if [ "$sysconfdir" != "/etc" ]; then diff --git a/etc/init.d/vyatta-no-tso b/etc/init.d/vyatta-no-tso new file mode 100644 index 0000000..d5d320a --- /dev/null +++ b/etc/init.d/vyatta-no-tso @@ -0,0 +1,36 @@ +# +# Startup script to disable TSO on ethernet interfaces using +# the "igb" driver. This works-around a performance issue +# with this driver in Jenner. Details in: +# +# https://bugzilla.vyatta.com/show_bug.cgi?id=5100 +# + +ACTION=$1 + +start() +{ + for i in /sys/class/net/eth* ; do + if [ -d $i ]; then + ifname=${i#/sys/class/net/} + driver=`/usr/sbin/ethtool -i $ifname | grep ^driver | awk '{print $2}'` + if [ "$driver" = "igb" ]; then + logger -t "vyatta-no-tso" -p local0.warning "Disabling TSO on $ifname" + /usr/sbin/ethtool -K $ifname tso off + fi + fi + done +} + +case "$ACTION" in + start) + start + ;; + *) + echo "usage: $0 start" + exit 1 + ;; +esac + +exit 0 + |