summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/init.d/vyatta-no-tso36
1 files changed, 36 insertions, 0 deletions
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
+