Disable TCP-Offloading {completely, generically and easily}

Solution 1:

On Debian, the ethtool package now provides an if-up.d script that implements options for offloading (and other ethtool settings).

You just have to install this package and add lines like these to the interface in/etc/network/interfaces.

auto eth0
iface eth0 inet static
    address 10.0.3.1/255.255.248.0
    gateway 10.0.2.10
    offload-tx  off
    offload-sg  off
    offload-tso off

Solution 2:

Eureka! Found "my" solution!

I'm simply placing my own disable-toe Script in /etc/network/if-up.d/ which disables tcp-offloading completely.

As bonus I've added an /etc/network/interfaces-Option, that disables this.

#!/bin/bash

RUN=true
case "${IF_NO_TOE,,}" in
    no|off|false|disable|disabled)
        RUN=false
    ;;
esac

if [ "$MODE" = start -a "$RUN" = true ]; then
  TOE_OPTIONS="rx tx sg tso ufo gso gro lro rxvlan txvlan rxhash"
  for TOE_OPTION in $TOE_OPTIONS; do
    /sbin/ethtool --offload "$IFACE" "$TOE_OPTION" off &>/dev/null || true
  done
fi