From: Jakub Kicinski <kuba@kernel.org>
To: Edward Cree <ecree.xilinx@gmail.com>
Cc: Gal Pressman <gal@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Simon Horman <horms@kernel.org>, Joe Damato <jdamato@fastly.com>,
Tariq Toukan <tariqt@nvidia.com>
Subject: Re: [PATCH net-next] net: ethtool: Don't check if RSS context exists in case of context 0
Date: Thu, 27 Feb 2025 08:56:08 -0800 [thread overview]
Message-ID: <20250227085608.5a3e32d7@kernel.org> (raw)
In-Reply-To: <c034259f-ec9a-2e78-1fc0-f16981cd4e54@gmail.com>
On Thu, 27 Feb 2025 16:24:52 +0000 Edward Cree wrote:
> > I never uttered the thought that lead me to opposing.
> > ctx 0 is a poor man's pass / accept. If someone needs a pass we should
> > add an explicit "action pass".
>
> To me 'pass' is just a shorthand for whatever specific behaviour
> happens to match the default. I.e. if you can already express
> that behaviour directly, then 'pass' is a strictly nonorthogonal
> addition and therefore bad interface design.
I presume sfc matches only one rule. For devices which terminate on
first hit and rules are ordered by ntuple ID, the following rules*:
src-ip 192.168.0.2 context 0
src-ip 192.0.0.0 m 0.255.255.255 action -1
implement allowing only 192.168.0.2 out of the 192.0.0.0/8 subnet.
The device may not even support RSS contexts.
I agree that pass is not very clean, but context 0 _is_ a pass.
It's not asking for context 0, it's asking for a nop rule which
prevents a more general rule from matching. To me at least.
* coin toss on the mask polarity
> But then, I'm the guy who thinks ed(1) is a good UI, so...
>
> > Using ctx 0 as implicit pass is a very easy thing to miss
> > for driver developers.
>
> I don't see why drivers need anything special to handle "0 is
> pass". They need to handle "0 isn't in the xarray" (so map it
> to the default HW context), which I suppose we ought to call out
> explicitly in the struct ethtool_rxnfc kdoc if we're going to
> continue allowing it, but it's not the fact that it's "an
> implicit pass" that makes this necessary. If there's something
> I'm missing here please educate me :)
Nothing super specific, but it does produce corner cases.
We may find out if someone got it wrong once we have the test.
next prev parent reply other threads:[~2025-02-27 16:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 7:13 [PATCH net-next] net: ethtool: Don't check if RSS context exists in case of context 0 Gal Pressman
2025-02-25 16:35 ` Joe Damato
2025-02-26 1:01 ` Jakub Kicinski
2025-02-26 6:08 ` Gal Pressman
2025-02-27 2:27 ` Jakub Kicinski
2025-02-27 4:45 ` Jakub Kicinski
2025-02-27 15:18 ` Edward Cree
2025-02-27 15:29 ` Jakub Kicinski
2025-02-27 16:24 ` Edward Cree
2025-02-27 16:56 ` Jakub Kicinski [this message]
2025-02-27 19:54 ` Edward Cree
2025-03-02 9:55 ` Gal Pressman
2025-03-03 22:17 ` Jakub Kicinski
2025-03-04 11:09 ` Gal Pressman
2025-03-04 11:27 ` Gal Pressman
2025-02-26 17:42 ` Joe Damato
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250227085608.5a3e32d7@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=jdamato@fastly.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.