From: Julius Bairaktaris <julius@bairaktaris.de>
To: Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>
Cc: netdev@vger.kernel.org, bridge@lists.linux.dev,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Willem de Bruijn" <willemb@google.com>,
"Simon Horman" <horms@kernel.org>,
"Nikolay Aleksandrov" <razor@blackwall.org>,
"Ido Schimmel" <idosch@nvidia.com>,
"Alvin Šipraga" <alvin.sipraga@analog.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Tobias Waldekranz" <tobias@waldekranz.com>,
"Linus Walleij" <linusw@kernel.org>,
"Pawel Dembicki" <paweldembicki@gmail.com>
Subject: [PATCH net v3 0/3] net: dsa: FDB events and tagging after a port left its bridge
Date: Fri, 4 Dec 2026 23:20:42 +0100 [thread overview]
Message-ID: <20261204222045.214014-1-julius@bairaktaris.de> (raw)
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
next reply other threads:[~2026-12-04 22:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 22:20 Julius Bairaktaris [this message]
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
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=20261204222045.214014-1-julius@bairaktaris.de \
--to=julius@bairaktaris.de \
--cc=alvin.sipraga@analog.com \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=f.fainelli@gmail.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=paweldembicki@gmail.com \
--cc=razor@blackwall.org \
--cc=tobias@waldekranz.com \
--cc=willemb@google.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