Subject: Re: [PATCH ethtool] netlink: rss: retrieve ring count using ETHTOOL_GRXRINGS ioctl

From: Jakub Kicinski <[email-masked]>
Date: Fri, 13 Sep 2024 13:34:26 -0700

On Fri, 13 Sep 2024 12:38:28 +0300 Vladimir Oltean wrote:
> Several drivers regressed when ethtool --show-rxfh was converted from
> ioctl to netlink. This is because ETHTOOL_GRXRINGS was converted to
> ETHTOOL_MSG_CHANNELS_GET, which is semantically equivalent to
> ETHTOOL_GCHANNELS but different from ETHTOOL_GRXRINGS. Drivers which
> implement ETHTOOL_GRXRINGS do not necessarily implement ETHTOOL_GCHANNELS
> or its netlink equivalent.
> 
> According to the man page, "A channel is an IRQ and the set of queues
> that can trigger that IRQ.", which is different from the definition of
> a queue/ring. So we shouldn't be attempting to query the # of rings for
> the ioctl variant, but the # of channels for the netlink variant anyway.
> 
> Reimplement the args->num_rings retrieval as in do_grxfh(), aka using
> the ETHTOOL_GRXRINGS ioctl.

Acked-by: Jakub Kicinski <[email-masked]>

Thanks for fixing this! Not sure why Sudheer didn't.