lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240711114535.pfrlbih3ehajnpvh@skbuf>
Date: Thu, 11 Jul 2024 14:45:35 +0300
From: Vladimir Oltean <vladimir.oltean@....com>
To: Michal Kubecek <mkubecek@...e.cz>,
	Sudheer Mogilappagari <sudheer.mogilappagari@...el.com>,
	netdev@...r.kernel.org
Cc: Wei Fang <wei.fang@....com>
Subject: Netlink handler for ethtool --show-rxfh breaks driver compatibility

Hi,

Commit ffab99c1f382 ("netlink: add netlink handler for get rss (-x)") in
the ethtool user space binary breaks compatibility with device drivers.

Namely, before the change, ethtool --show-rxfh did not emit a
ETHTOOL_MSG_CHANNELS_GET netlink message or even the ETHTOOL_GCHANNELS
ioctl variant. Now it does, and this effectively forces a new
requirement for drivers to implement ethtool_ops :: get_channels() in
the kernel.

The following drivers implement ethtool_ops :: get_rxfh() but not
ethtool_ops :: get_channels():
- drivers/net/ethernet/microchip/lan743x_ethtool.c
- drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
- drivers/net/ethernet/marvell/mvneta.c
- drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c
- drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
- drivers/net/ethernet/sfc/ef100_ethtool.c
- drivers/net/ethernet/sfc/falcon/ethtool.c
- drivers/net/ethernet/sfc/siena/ethtool.c
- drivers/net/ethernet/sfc/ethtool.c
- drivers/net/ethernet/intel/ixgbevf/ethtool.c

Thus, for them, this is a breaking ABI change which must be addressed.

A demo for the enetc driver.

Before:
  $ ethtool --show-rxfh eno0
  RX flow hash indirection table for eno0 with 2 RX ring(s):
      0:      0     1     0     1     0     1     0     1
      8:      0     1     0     1     0     1     0     1
     16:      0     1     0     1     0     1     0     1
     24:      0     1     0     1     0     1     0     1
     32:      0     1     0     1     0     1     0     1
     40:      0     1     0     1     0     1     0     1
     48:      0     1     0     1     0     1     0     1
     56:      0     1     0     1     0     1     0     1
  RSS hash key:
  0d:1f:cb:76:88:82:dd:ea:70:c9:ef:53:3e:f3:bf:60:5c:79:60:09:32:ff:88:fa:aa:39:63:31:ef:ad:31:e4:ac:57:ec:d2:09:4d:9a:01
  RSS hash function:
      toeplitz: on
      xor: off
      crc32: off

After:
  $ ethtool --show-rxfh eno0
  netlink error: Operation not supported

Sadly, I do not have the time to investigate a possible fix for this
issue, but I am more than happy to test out proposals.

Thanks,
Vladimir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ