[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250814080856.1222bcc7@kernel.org>
Date: Thu, 14 Aug 2025 08:08:56 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Roger Quadros <rogerq@...nel.org>
Cc: Siddharth Vadapalli <s-vadapalli@...com>, Andrew Lunn
<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Russell
King <linux@...linux.org.uk>, danishanwar@...com, srk@...com,
linux-omap@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v4 8/9] net: ethernet: ti: am65-cpsw: add
network flow classification support
On Thu, 14 Aug 2025 16:44:49 +0300 Roger Quadros wrote:
> >> Because driver doesn't have logic to decide the location and relies on ethtool to
> >> decide it if user doesn't supply it.
> >
> > The location supplied by the user may have semantic significance.
> > IOW locations may be interpreted as priorities.
>
> OK. Is there any convention on location vs priority for user or it is driver dependent?
> i.e. Does higher location mean higher priority?
/**
* struct ethtool_rx_flow_spec - classification rule for RX flows
[...]
* @location: Location of rule in the table. Locations must be
* numbered such that a flow matching multiple rules will be
* classified according to the first (lowest numbered) rule.
*/
> > It's better to support LOC_ANY and add the 10 lines of code to
> > allocate the id in the driver..
>
> OK.
>
> I did more tests and it seems that higher locations in the classifier override the lower locations.
>
> With this new information, what is the best approach?
>
> I can add support for LOC_ANY with logic to find first available free location.
> If driver supports LOC_ANY, does driver also need to support explicit
> location supplied by user? In this case I think user convention and
> driver convention of location vs priority must match.
If your device supports ordering then it's up to you.
LOC_ANY has slight performance advantage, because CLI doesn't have
to dump all the rules to find an unused ID. But I'm mostly concerned
about the semantics, the performance thing may not matter, depending
on how many rules you can support in the first place.. up to you.
Powered by blists - more mailing lists