diff options
-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 + |