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: <20231122110120.crs4rh2utjweswsc@skbuf>
Date:   Wed, 22 Nov 2023 13:01:20 +0200
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     Wei Fang <wei.fang@....com>
Cc:     davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, claudiu.manoil@....com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: enetc: add ethtool::get_channels support

Hi Wei,

On Wed, Nov 22, 2023 at 06:25:40PM +0800, Wei Fang wrote:
> Since ETHTOOL_MSG_RSS_GET netlink message [1] has been applied to
> ethtool tree, there is a netlink error when using "ethtool -x eno0"
> command to get RSS information from fsl-enetc driver, and the user
> cannot get the information, the error logs are as follows:
> 
> root@...028ardb:~# ./ethtool -x eno0
> netlink error: Operation not supported
> 
> The rationale is that ethtool will issue a ETHTOOL_MSG_CHANNELS_GET
> netlink message to get the number of Rx ring. However, the fsl-enetc
> driver doesn't support ethtool::get_channels, so it directly returns
> -EOPNOTSUPP error.
> 
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/ethtool.git/commit/?id=ffab99c1f3820e21d65686e030dcf2c4fd0a8bd0
> 
> Signed-off-by: Wei Fang <wei.fang@....com>
> ---

I think we have 2 problems on our hands.

1. enetc is not the only driver that doesn't report ETHTOOL_MSG_CHANNELS_GET.
   So it is a general issue for Sudheer Mogilappagari's implementation
   of "ethtool -x" using netlink. The ioctl-based implementation used to
   look at ETHTOOL_GRXRINGS which was handled in the kernel through
   ethtool_ops :: get_rxnfc.

2. I used to have a different implementation (and interpretation) of
   ETHTOOL_MSG_CHANNELS_GET for enetc anyway, which associated channels
   not with rings, but with interrupt vectors (making the reported
   channels combined):
   https://patchwork.kernel.org/project/netdevbpf/patch/20230206100837.451300-6-vladimir.oltean@nxp.com/

I would suggest finding a way for the user space implementation to not
assume that ETHTOOL_MSG_CHANNELS_GET is implemented by the driver.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ