Re: [PATCH net-next 00/12] net: bridge: vlan: optimize standard fdb fwding path
flat view
From: patchwork-bot+netdevbpf@kernel.org
Date: 2026-10-02 20:00:14
Also in:
bridge
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski [off-list ref]: On Wed, 30 Sep 2026 10:13:59 +0300 you wrote:
Hi, This patch-set is a follow-up after the bridge flood fwding path optimizations and applies the same idea to the standard fdb fwding path. We are able to remove 2 vlan hash lookups in the standard fdb fwding path by caching the port-VLAN pointer in the fdb, to do that we switch the fdb dst to an opaque type that can be either a port pointer or vlan pointer differentiated by a bit. The field is a struct and also has a __private tag so we can catch direct users, it should be used only via the helpers. Sharing a field makes it easier to pass it around and also allows us to save struct space for the fast-path. Interesting case is when an fdb is promoted from a raw port to port-VLAN on the same port, it needs to be handled carefully so we use cmpxchg to make sure we don't generate deletion/replace notifications because it doesn't change the port. I tested VLAN deletion after these changes (we now wait a grace period for every delete) and the hit was ~20% reduction in deleted VLANs / sec deleting 4k VLANs took 14ms more and on my VM the VLANs deleted / sec went from 63k to 52k / sec. The complexity to batch them is not worth it. [...]
Here is the summary with links:
- [net-next,01/12] net: bridge: introduce a bridge destination type
https://git.kernel.org/netdev/net-next/c/13bb47965e02
- [net-next,02/12] net: bridge: use net_bridge_dst for fdb destinations
https://git.kernel.org/netdev/net-next/c/fd7a8eb03c32
- [net-next,03/12] net: bridge: add VLAN support to bridge destinations
https://git.kernel.org/netdev/net-next/c/a39c339fd6c5
- [net-next,04/12] net: bridge: vlan: return VLAN entries from ingress helpers
https://git.kernel.org/netdev/net-next/c/cebd6130e6c2
- [net-next,05/12] net: bridge: fdb: pass VLAN entries to learning updates
https://git.kernel.org/netdev/net-next/c/8247ef76032b
- [net-next,06/12] net: bridge: fdb: consolidate port-VLAN cleanup
https://git.kernel.org/netdev/net-next/c/f0a349b92120
- [net-next,07/12] net: bridge: vlan: split unpublishing from deletion
https://git.kernel.org/netdev/net-next/c/e5c71bf91447
- [net-next,08/12] net: bridge: vlan: quiesce readers before freeing port VLANs
https://git.kernel.org/netdev/net-next/c/83edc87a9172
- [net-next,09/12] net: bridge: fdb: factor out existing entry updates
https://git.kernel.org/netdev/net-next/c/941056f91907
- [net-next,10/12] net: bridge: fdb: cache port VLANs in learned entries
https://git.kernel.org/netdev/net-next/c/8009eb405fc6
- [net-next,11/12] net: bridge: fdb: cache VLAN destinations in configured entries
https://git.kernel.org/netdev/net-next/c/8533e9b85bd2
- [net-next,12/12] net: bridge: fdb: avoid VLAN lookups in unicast forwarding
https://git.kernel.org/netdev/net-next/c/f1829618e0ad
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html