Package: ethtool
Version: 1:4.8-1
Severity: normal

Hi,

in network/interfaces I have set the option "offload_tx off" for eth0. This
causes `ifdown eth0 ; ifup eth0` to fail when offloading already
was set to off.

The culprit is ethtool, which inconsistently exits 0 or 1 when offloading is
enabled/disabled repeatedly:


----------------8<-----------------
# offloading initially off
# ethtool --offload eth0 tx on ; echo $?
Actual changes:
tx-checksum-ipv6: on
tcp-segmentation-offload: on
        tx-tcp6-segmentation: on
0
# ethtool --offload eth0 tx on ; echo $?
0
# ethtool --offload eth0 tx on ; echo $?
0

# ^--- repeated enabling returns no error


# ethtool --offload eth0 tx off ; echo $?
Actual changes:
tx-checksum-ipv6: off
tcp-segmentation-offload: off
        tx-tcp6-segmentation: off [requested on]
0

# ^--- initial disabling is ok

# ethtool --offload eth0 tx off ; echo $?
Could not change any device features
1
# ethtool --offload eth0 tx off ; echo $?
Could not change any device features
1

# ^--- repeated disabling returns 1
---------------->8-----------------





For now I'm using this workaround in the eth0 stanza:

----------------8<-----------------
    pre-up ethtool --offload $IFACE tx off
---------------->8-----------------



Cheers

Daniel


-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'stable-updates'), (500, 
'proposed-updates'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-1-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages ethtool depends on:
ii  libc6  2.24-9

ethtool recommends no packages.

ethtool suggests no packages.

-- Configuration Files:
/etc/network/if-up.d/ethtool changed [not included]

-- no debconf information

Reply via email to