Netdev List
 help / color / mirror / Atom feed
* [PATCH net v3 0/3] net: dsa: FDB events and tagging after a port left its bridge
@ 2026-12-04 22:20 Julius Bairaktaris
  2026-12-04 22:20 ` [PATCH net v3 1/3] net: dsa: do not run queued FDB events after the port left the bridge Julius Bairaktaris
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Julius Bairaktaris @ 2026-12-04 22:20 UTC (permalink / raw)
  To: Andrew Lunn, Vladimir Oltean
  Cc: netdev, bridge, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Willem de Bruijn, Simon Horman, Nikolay Aleksandrov,
	Ido Schimmel, Alvin Šipraga, Florian Fainelli,
	Tobias Waldekranz, Linus Walleij, Pawel Dembicki

Patch 1 drops the FDB events still queued when a port has left its
bridge, and frees the bridge only after its lockless readers are done.
Patch 2 holds the device that a queued FDB event reports to. Patch 3
makes the taggers forward a marked frame on behalf of the bridge only
while the port is in a bridge that has a number; it relies on the grace
period that patch 1 adds before the bridge is freed. Patches 1 and 2
change the same exit of dsa_user_switchdev_event_work(), so they go
together.

The rollback oops of patch 1 was pointed out by the hosted Sashiko
review of a DSA host FDB series, patch 2 comes from an LLM review
(Claude) of a DSA FDB change of mine, and patch 3 from the hosted
Sashiko reviews of v1 and v2 and an LLM review of v2. Each patch was
run in QEMU with KASAN and dsa_loop given test-only FDB operations, TX
forwarding offload and the vsc73xx-8021q or dsa tagger; the numbers
are in the patches.

I used Claude (Anthropic) to help write these patches.

Changes in v3:
- Patch 1: the message says why no in-flight path can take a reference
  to the bridge, and what the grace period costs, after Paolo Abeni's
  question on v1:
  https://lore.kernel.org/all/dfe749f5-83de-4802-bcff-7517ea6b7283@redhat.com/
  Code unchanged.
- Patch 3: forward on behalf of the bridge only when it has a number;
  dsa_xmit_ll() sent a FORWARD tag for bridge 0 from a bridged port of a
  mv88e6xxx switch without a cross-chip port VLAN table (hosted Sashiko
  review of v2, High). The message names a redirect into a port of a
  bridge that has a number as a case that remains (same review,
  Medium), and an mv88e6xxx tree that mixes chips with and without that
  table, where such a marked frame now goes to one port.
- How each patch was found and the QEMU runs moved below the --- line.
- Rebased on net e9d78fc6741a.

Changes in v2:
- Patch 1: the remaining lockless readers of dp->bridge use READ_ONCE()
  (hosted Sashiko review of v1).
- Patch 2: rebased on patch 1; v1 did not apply after it in NIPA.
- Patch 3: new.

v2: https://lore.kernel.org/all/20261128133503.3887987-1-julius@bairaktaris.de/
v1 of patch 1: https://lore.kernel.org/all/20261121185821.1471559-1-julius@bairaktaris.de/
v1 of patch 2: https://lore.kernel.org/all/20261122173347.791590-1-julius@bairaktaris.de/

Julius Bairaktaris (3):
  net: dsa: do not run queued FDB events after the port left the bridge
  net: dsa: hold the device a queued FDB event is reported to
  net: dsa: forward a marked frame only while its port is in a bridge

 include/net/dsa.h           | 10 +++++---
 net/dsa/port.c              | 50 ++++++++++++++++++++++++-------------
 net/dsa/port.h              | 26 ++++++++++---------
 net/dsa/tag.h               | 18 +++++++++++--
 net/dsa/tag_8021q.c         |  2 +-
 net/dsa/tag_dsa.c           | 11 ++++----
 net/dsa/tag_sja1105.c       | 19 +++++++-------
 net/dsa/tag_vsc73xx_8021q.c | 10 +++-----
 net/dsa/user.c              | 31 +++++++++++++++++------
 9 files changed, 115 insertions(+), 62 deletions(-)


base-commit: e9d78fc6741ac06d438cf64e314c28e57014432a
-- 
2.53.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-05 22:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 22:20 [PATCH net v3 0/3] net: dsa: FDB events and tagging after a port left its bridge Julius Bairaktaris
2026-12-04 22:20 ` [PATCH net v3 1/3] net: dsa: do not run queued FDB events after the port left the bridge Julius Bairaktaris
2026-12-04 22:20 ` [PATCH net v3 2/3] net: dsa: hold the device a queued FDB event is reported to Julius Bairaktaris
2026-12-04 22:20 ` [PATCH net v3 3/3] net: dsa: forward a marked frame only while its port is in a bridge Julius Bairaktaris
2026-12-05 22:44   ` netdev-bot+sashiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox