Ethernet Bridge development
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Nikolay Aleksandrov <razor@blackwall.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	bridge@lists.linux.dev
Subject: Re: [PATCH net-next 0/9] net: bridge: vlan: broadcast fwding path optimizations
Date: Mon, 21 Sep 2026 16:44:58 +0300	[thread overview]
Message-ID: <20260921134458.GA2199421@shredder> (raw)
In-Reply-To: <20260918152950.1938259-1-razor@blackwall.org>

On Fri, Sep 18, 2026 at 06:29:41PM +0300, Nikolay Aleksandrov wrote:
> Hi,
> This patch-set is the first step to removing unnecessary VLAN hash lookups
> from the bridge fast-path and also provides additional broadcast path
> optimization by considering only the port-VLANs that actually participate
> in the VLAN instead of all bridge ports. Combined these changes bring
> considerable improvements[1] and open the path to do the same for the most
> common fdb forwarding path. As expected the pathological cases have the
> largest gain, e.g. if we have 1 client / VM facing port and 1 upstream port
> only participating in a VLAN with many other bridge ports, we consider only
> those 2 when broadcasting in that VLAN.
> 
> For up to 8 ports we only use the port-VLAN list as the array doesn't make
> much of a difference and is unnecessary. Note that the array is rebuilt on
> every member add or delete when >8 members, I tested that and could do
> 2000 VLAN add/delete with 64 port-VLAN members / sec on my test VM.
> If it ever becomes a problem we can optimize it further, for the time
> being I prefer it is simpler.

Very nice!

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

A couple of nits that you can handle later (or not):

1. Patch #3:

__vlan_delete_pvid(vg, rtnl_dereference(vg->pvid));

Can be simplified to:

RCU_INIT_POINTER(vg->pvid, NULL);

2. Patch #7:

Initially I thought that 'fwd.vlan' is never set, but then I realized
that in the only place where this field is actually set it's called
'dst.vlan', which is a bit confusing given that in the context of the
bridge driver 'dst' is usually an FDB entry. I would probably rename it
to 'fwd' to be consistent with the rest of the code.

  parent reply	other threads:[~2026-09-21 13:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 15:29 [PATCH net-next 0/9] net: bridge: vlan: broadcast fwding path optimizations Nikolay Aleksandrov
2026-09-18 15:29 ` [PATCH net-next 1/9] net: bridge: factor out common flood completion handling Nikolay Aleksandrov
2026-09-18 15:29 ` [PATCH net-next 2/9] net: bridge: factor out port flooding Nikolay Aleksandrov
2026-09-18 15:29 ` [PATCH net-next 3/9] net: bridge: vlan: cache the pvid vlan entry directly Nikolay Aleksandrov
2026-09-19 18:07   ` Nikolay Aleksandrov
2026-09-18 15:29 ` [PATCH net-next 4/9] net: bridge: vlan: introduce a list of port-VLANs in the master VLAN Nikolay Aleksandrov
2026-09-18 15:29 ` [PATCH net-next 5/9] net: bridge: consider only port-VLAN members when flooding Nikolay Aleksandrov
2026-09-18 15:29 ` [PATCH net-next 6/9] net: bridge: vlan: use an RCU array for large flood sets Nikolay Aleksandrov
2026-09-18 15:29 ` [PATCH net-next 7/9] net: bridge: introduce a forwarding destination structure Nikolay Aleksandrov
2026-09-18 15:29 ` [PATCH net-next 8/9] net: bridge: avoid egress VLAN lookups when flooding Nikolay Aleksandrov
2026-09-18 15:29 ` [PATCH net-next 9/9] net: bridge: avoid VLAN lookups for flood neighbour suppression Nikolay Aleksandrov
2026-09-21 13:44 ` Ido Schimmel [this message]
2026-09-21 13:57   ` [PATCH net-next 0/9] net: bridge: vlan: broadcast fwding path optimizations Nikolay Aleksandrov
2026-09-22  0:50 ` patchwork-bot+netdevbpf

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=20260921134458.GA2199421@shredder \
    --to=idosch@nvidia.com \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    /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