Commit 2ddc4bde by Jocelyn Delalande

router: disable TCP offloading on all interfaces

It was already disabled on some bridges. This patch makes it for all
interfaces.

That might not be required with all network adapters/setups, but causing
trouble with mine.
parent bd71a1ad
#!/bin/bash
#
# Disables TCP offloading on all ifaces
#
# Inspired by: @Michelunik https://serverfault.com/a/422554/62953
RUN=true
case "${IF_NO_TOE,,}" in
no|off|false|disable|disabled)
RUN=false
;;
esac
# Other offloading options that could be disabled (not TCP related):
# sg tso ufo gso gro lro rxvlan txvlan rxhash
# see man ethtool
if [ "$MODE" = start -a "$RUN" = true ]; then
TOE_OPTIONS="rx tx"
for TOE_OPTION in $TOE_OPTIONS; do
/sbin/ethtool --offload "$IFACE" "$TOE_OPTION" off &>/dev/null || true
done
fi
......@@ -19,3 +19,14 @@
- name: Set IPv6 firewall rules
template: src=ip6tables.j2 dest=/etc/ip6tables
notify: reload firewall rules
# TCP offloading with e1000e module was buggy with errors like
# e1000e 0000:00:19.0 eth0: Detected Hardware Unit Hang
# ...
# e1000e 0000:00:19.0 eth0: Reset adapter unexpectedly
# See http://serverfault.com/questions/616485/
- name: Disable TCP offloading features
copy:
src: files/if-up-disable-tcp-offloading
dest: /etc/network/if-up.d/disable-tcp-offloading
mode: 0744
......@@ -16,7 +16,6 @@ iface {{ dmz_iface }} inet static
bridge_fd 0
bridge_stp off
bridge_maxwait 0
post-up /sbin/ethtool -K {{ dmz_iface }} tx off rx off
# That is ugly but needed : cant have 2 stanzas for same bridge
# otherwise the up/down fails.
up ip a a {{ dmz_ip6 }} dev {{ dmz_iface }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment