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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA1PR11MB626638AF6428C3E669F3FD4FE4A12@IA1PR11MB6266.namprd11.prod.outlook.com>
Date: Mon, 15 Jul 2024 07:37:45 +0000
From: "Mogilappagari, Sudheer" <sudheer.mogilappagari@...el.com>
To: Vladimir Oltean <vladimir.oltean@....com>, Michal Kubecek
	<mkubecek@...e.cz>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: Wei Fang <wei.fang@....com>, "Samudrala, Sridhar"
	<sridhar.samudrala@...el.com>
Subject: RE: Netlink handler for ethtool --show-rxfh breaks driver
 compatibility

Hi Vladimir, 

Here is related discussion wrt this topic https://lore.kernel.org/netdev/IA1PR11MB626656578C50634B3C90E0C4E40E9@IA1PR11MB6266.namprd11.prod.outlook.com/T/#mdfcc6e25edb5b7719356db4759dc13e2a9020487

While introducing netlink support for ethtool --show-rxfh
the tradeoff was whether to modify the command output or to
use ETHTOOL_GCHANNELS to get the queue count. We went with
not modifying command output. Didn't realize about drivers
with no get_channels() support. Currently I have no ideas
on how to resolve this other than drivers implementing
get_channels() support. Any other ideas are welcome.

Though not a solution, one workaround is to compile ethtool
with no netlink support. 

Thanks
Sudheer



> -----Original Message-----
> From: Vladimir Oltean <vladimir.oltean@....com>
> Sent: Thursday, July 11, 2024 4:46 AM
> To: Michal Kubecek <mkubecek@...e.cz>; Mogilappagari, Sudheer
> <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