From: Nikolay Aleksandrov <razor@blackwall.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Oleksij Rempel <linux@rempel-privat.de>
Cc: Johannes Nixdorf <jnixdorf-oss@avm.de>,
netdev@vger.kernel.org, Ido Schimmel <idosch@nvidia.com>,
bridge@lists.linux-foundation.org,
Eric Dumazet <edumazet@google.com>,
Roopa Prabhu <roopa@nvidia.com>, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries
Date: Tue, 16 May 2023 13:32:05 +0300 [thread overview]
Message-ID: <ce3835d9-c093-cfcb-3687-3a375236cb8f@blackwall.org> (raw)
In-Reply-To: <20230516102141.w75yh6pdo53ufjur@skbuf>
On 16/05/2023 13:21, Vladimir Oltean wrote:
> Hi,
>
> On Tue, May 16, 2023 at 11:56:41AM +0300, Nikolay Aleksandrov wrote:
>> Hmm.. perhaps we can add a flag mask of entries to count. Initially it can be
>> only dynamic entries. We should include more people in this discussion (+CC Ido and Vladimir).
>> Switchdev folks might have more specific requirements and restrictions, so it'd be nice to get
>> their input as well.
>
> I have some other things to do until I can take a closer look at this
> discussion, but in principle, switchdev drivers will likely want to
> impose their own limit on FDB entries because the hardware itself is
> inherently limited in size, so I'm thinking there should be another way
> for the software bridge to be informed about this limit other than UAPI.
Yep, that's ok but it can be added later. This is pretty much internal.
> Which ports that limit should affect (think bridging between ports of
> different switches with different FDB sizes) I don't know. If we only
> consider switchdev, FDB limits should probably be per hwdom.
>
Now, that's a whole different issue (per-port limits). I've prototype patches
for that too, but it's a much harder problem to solve and scale in software.
Let's please focus on the single global limit for the moment.
> Also, in terms of static vs dynamic limits, I've seen hardware
> implementations where static FDB entries go to a different FDB table
> compared to dynamic ones (Microchip KSZ DSA switches), implementations
> where static partitioning between static and dynamic FDB entries is
> possible but configurable, and implementations where they all consume
> from the shared space and you'd have to evict a dynamic entry to install
> a static one. So it's hard to really say what's the size. That, plus not
> to mention, many hardware FDBs are not fully associative, and due to
> hash collisions, you may be unable to install an entry in the 4-way
> associative bin where its {MAC,VID} hash says it should go, even though
> the FDB at large is not full.
>
> It sounds sexy to take switchdev into consideration, but I'm not really
> sure what we want. Something flexible to cater for the above, probably.
> This discussion should probably be merged with:
> https://lore.kernel.org/netdev/20230324144917.32lnpgtw5auuyovy@skbuf/T/#ma600839815582ca61886e83ba533b1dfbe447557
> so I'm CCing Oleksij too, since he probably knows better than me what he
> wants.
>
Let's take a step back, I wasn't suggesting we start with a full-fledged switchdev
implementation. :) I meant only to see if the minimum global limit implementation
suggested would suffice and would be able to later extend so switchdev can use and
potentially modify (e.g. drivers setting limits etc). We can start with a simple
support for limits and then extend accordingly. The important part here is to
not add any uAPI that can't be changed later which would impact future changes.
> In the thread with DSA trace events, there also was a short talk about
> user space theoretically being able to infer FDB sizes and utilization
> degree based on instrumenting with ftrace, which is something we wouldn't
> like to have to maintain. So I'm adding the DSA maintainers too, since
> there is interest for agreeing on a different API.
> https://lore.kernel.org/netdev/2f150ad4-34f4-4af9-b3ce-c1aff208ec7e@lunn.ch/T/#mfa895245fd012e8f66db784fa568109dba396aa7
next prev parent reply other threads:[~2023-05-16 10:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 8:50 [Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries Johannes Nixdorf
2023-05-15 8:50 ` [Bridge] [PATCH net-next 2/2] bridge: Add a sysctl to limit new brides " Johannes Nixdorf
2023-05-15 9:35 ` Nikolay Aleksandrov
2023-05-15 11:27 ` Johannes Nixdorf
2023-05-16 8:27 ` Nikolay Aleksandrov
2023-05-15 15:56 ` Stephen Hemminger
2023-05-16 8:27 ` Johannes Nixdorf
2023-05-15 9:35 ` [Bridge] [PATCH net-next 1/2] bridge: Add a limit on " Nikolay Aleksandrov
2023-05-16 8:12 ` Johannes Nixdorf
2023-05-16 8:21 ` Nikolay Aleksandrov
2023-05-16 8:30 ` Nikolay Aleksandrov
2023-05-16 8:38 ` Nikolay Aleksandrov
2023-05-16 8:53 ` Johannes Nixdorf
2023-05-16 8:56 ` Nikolay Aleksandrov
2023-05-16 10:21 ` Vladimir Oltean
2023-05-16 10:32 ` Nikolay Aleksandrov [this message]
2023-05-16 10:44 ` Vladimir Oltean
2023-05-16 10:47 ` Nikolay Aleksandrov
2023-05-16 10:55 ` Vladimir Oltean
2023-05-16 11:04 ` Nikolay Aleksandrov
2023-05-16 11:10 ` Vladimir Oltean
2023-05-16 11:18 ` Nikolay Aleksandrov
2023-05-26 8:37 ` Johannes Nixdorf
-- strict thread matches above, loose matches on Subject: below --
2023-10-19 15:39 Scott Wadkins
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=ce3835d9-c093-cfcb-3687-3a375236cb8f@blackwall.org \
--to=razor@blackwall.org \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=idosch@nvidia.com \
--cc=jnixdorf-oss@avm.de \
--cc=kuba@kernel.org \
--cc=linux@rempel-privat.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=roopa@nvidia.com \
--cc=vladimir.oltean@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox