Subject: Re: [PATCH ethtool-next] rxclass: Make output for RSS context action explicit

From: Jakub Kicinski <[email-masked]>
Date: Tue, 12 Nov 2024 07:24:34 -0800

On Tue, 12 Nov 2024 09:24:07 +0000 Edward Cree wrote:
> On 09/11/2024 17:42, Jakub Kicinski wrote:
> >  - fixes for helpers used in "is the queue in use" checks like
> >    ethtool_get_max_rss_ctx_channel()  
> 
> If there's an RSS context that names a queue, but no rxnfc filters
>  currently target that context, should the queue be considered "in
>  use" or not?  (Currently it is.)
> I'm trying to figure out how much of ethtool_get_max_rss_ctx_channel
>  can be subsumed by the logic I'll need to add to
>  ethtool_get_max_rxnfc_channel; if we don't count unused contexts as
>  'using' their queues then ethtool_get_max_rss_ctx_channel() can
>  almost entirely disappear.

Hm, interesting idea...
Practically speaking I think it introduces complexity and I'm not sure
anyone will actually benefit (IOW why would anyone want to keep /
create context for inactive queues?).

Drivers may not expect to have contexts pointing to disabled queues.

My gut feeling is that we should just leave a comment for posterity
somewhere in the code but continue to validate both based on rules 
and based on "direct" context membership.