Re: [PATCH net 0/6] net: dsa: offload_fwd_mark on unbridged ports, bridge numbers across switches
From: Julius Bairaktaris
Date: Sun Dec 06 2026 - 05:06:37 EST
willemb@xxxxxxxxxx wrote:
> However, the series is NOT ready to merge: [...] and bundling of two
> unrelated DSA topics targeting post-rc4 net.
The two topics are now separate. Patches 1-3 are superseded by "net: dsa:
FDB events and tagging after a port left its bridge", whose v4 has the
RCU free, one read of dp->bridge and the bridge number check in all
three taggers:
https://lore.kernel.org/all/20261206092438.95580-1-julius@xxxxxxxxxxxxxx/
Patches 4-6 are in v2 of "net: dsa: bridge numbers across switches":
https://lore.kernel.org/all/20261206100504.1409651-1-julius@xxxxxxxxxxxxxx/
On 2/6:
> bypassing sja1105_is_link_local(skb) in both sja1105_xmit() [...] and
> sja1110_xmit()
In that v4, sja1105_xmit() and sja1110_xmit() take the bridge path only
for a marked frame on a port in a bridge with a number; every other
frame reaches the link-local and control-header handling as before.
On 3/6:
> it fails to check bridge->tx_fwd_offload (or bridge->num != 0)
It checks bridge->num. tx_fwd_offload is shared by the switches of the
tree and written by each join, so it does not tell whether this port's
switch forwards for the bridge. The bridge marks frames for a port only
after switchdev_bridge_port_offload(), which runs once the switch has
mapped the bridge, so the join window is reached only by a stale mark.
> Clearing skb->offload_fwd_mark on egress redirect [...] fixes the root
> cause rather than only standalone targets.
Clearing it in act_mirred or nft breaks ingress shaping through ifb on a
bridged switch port: ifb hands the redirected frame back to the port it
came from, and the bridge needs the mark there to skip the ports the
switch has already forwarded it to. The redirect into a port of a
numbered bridge stays open, and the v4 3/3 message says so.
On 4/6 and 6/6:
> Fixing dsa_bridge_num_find() to check `if (bridge && bridge->num)`
> fixes both Patch 4/6 and Patch 6/6.
Patch 1 of the bridge-number v2 does that, with Fixes: d3eed0e57d5d,
which patch 4 there now cites too.
> dsa_tree_list and dst->ports are mutated under dsa2_mutex without
> rtnl_lock()
Patch 7 there takes rtnl_lock() around those changes and around the
registration of the switch notifiers, inside dsa2_mutex, the order the
drivers' setup already uses.
Julius