From: Vladimir Oltean <olteanv@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Woojung Huh <woojung.huh@microchip.com>,
UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Nikolay Aleksandrov <razor@blackwall.org>,
Ido Schimmel <idosch@nvidia.com>,
netdev@vger.kernel.org, bridge@lists.linux.dev,
kernel@pengutronix.de
Subject: Re: [PATCH net-next 0/5] net: dsa: microchip: let the bridge decide about link-local frames
Date: Thu, 26 Nov 2026 12:23:55 +0200 [thread overview]
Message-ID: <awgHiY9mcEAD1C34@skbuf> (raw)
In-Reply-To: <20261126-ksz-stp-link-local-v1-0-39aed15f6271@pengutronix.de>
Hi Oleksij,
On Thu, Nov 26, 2026 at 09:07:47AM +0100, Oleksij Rempel wrote:
> Let the bridge decide about the link-local frames that the KSZ9477
> family and LAN937x trap to the CPU. These switches trap most link-local
> groups (01:80:C2:00:00:0X, for example STP BPDUs and LLDP), but the
> tagger marks the frames as forwarded in hardware. So the bridge never
> forwards them to the other ports of the switch, whatever group_fwd_mask
> says. An FDB or MDB entry for such a group can also make the switch
> forward these frames on its own.
>
> The tagger now leaves these frames unmarked, and the driver keeps FDB
> and MDB entries for them out of the hardware. As the bridge then sends
> some link-local frames back out through the CPU port, the switch no
> longer learns addresses there; DSA adds the addresses that the bridge
> learns on its other ports, such as Wi-Fi, as static entries instead. An
> old FDB bug hits these entries often, so one patch fixes it; without the
> series it needs a static entry added over a learned one, so that patch
> goes to net-next with the series. The series goes to net-next as it
> changes how the bridge handles link-local frames.
>
> To reproduce on a KSZ9893, with link partners on lan1 and lan2:
>
> ip link add br0 type bridge
> ip link set lan1 master br0 up; ip link set lan2 master br0 up
> ip link set br0 up
> # 0x4000: forward 01:80:C2:00:00:0E
> ip link set br0 type bridge group_fwd_mask 0x4000
> # Send frames to 01:80:C2:00:00:0E into lan1. Without the series
> # none reach lan2; with it, all do.
>
> With STP off, the bridge now also forwards BPDUs between the ports of
> the switch. IEEE 802.1Q says a bridge filters frames to the reserved
> addresses, including the BPDU address 01:80:C2:00:00:00. The Linux
> bridge forwards BPDUs when STP is off, so that other bridges can still
> detect a loop through it; see commit a598f6aebea2 ("bridge: relay
> bridge multicast pkgs if !STP"). DSA switches whose tagger leaves
> trapped or link-local frames unmarked, such as mv88e6xxx and b53,
> already behave this way.
>
> The switches driven by ksz8.c (KSZ8463, KSZ87xx, KSZ88x3, KSZ8864,
> KSZ8895, KSZ8995XA) keep their behaviour; KSZ8563 and KSZ8567 use the
> KSZ9477 code and are covered. The ksz8.c switches have one static MAC
> table. It holds the trap entries, the FDB and MDB entries and the local
> addresses of the bridge, and on the KSZ88x3 it has only 8 entries, so a
> change on the KSZ88x3 can run out of space. Of these switches I can test
> only a KSZ8873, so I left them unchanged. Their taggers still mark all
> frames as forwarded.
>
> Tested on a KSZ9893.
>
> ---
> Oleksij Rempel (5):
> net: dsa: tag_ksz: do not mark trapped link-local frames as forwarded
> net: dsa: microchip: ksz9477: do not keep the learned port in FDB entries
> net: dsa: microchip: ksz9477: do not learn addresses on the CPU port
> net: dsa: microchip: ksz9477: refuse FDB/MDB entries for trapped groups
> net: dsa: microchip: ksz9477: report the trapped link-local groups
>
> drivers/net/dsa/microchip/ksz9477.c | 81 +++++++++++++++++++++++++++++---
> drivers/net/dsa/microchip/ksz_common.h | 14 ++++++
> drivers/net/dsa/microchip/lan937x_main.c | 16 ++++---
> include/linux/dsa/ksz_common.h | 8 ++++
> net/dsa/tag_ksz.c | 42 ++++++++++++++++-
> 5 files changed, 145 insertions(+), 16 deletions(-)
> ---
> base-commit: c2621b518b38ed38e280e008aa33e6c2d302f8cc
> change-id: 20261125-ksz-stp-link-local-5c53396cc960
>
> Best regards,
> --
> Oleksij Rempel <o.rempel@pengutronix.de>
>
I didn't go into any sort of detail in these patches yet, but they
reminded me of this thread:
https://lore.kernel.org/netdev/20250127125426.3b7cdkb75o5dbcr5@skbuf/
IIRC Tim's problem there still wasn't resolved (he tried to use the
reserved multicast address tables). Does your series address his issue
too?
prev parent reply other threads:[~2026-11-26 10:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 8:07 [PATCH net-next 0/5] net: dsa: microchip: let the bridge decide about link-local frames Oleksij Rempel
2026-11-26 8:07 ` [PATCH net-next 1/5] net: dsa: tag_ksz: do not mark trapped link-local frames as forwarded Oleksij Rempel
2026-11-26 8:07 ` [PATCH net-next 2/5] net: dsa: microchip: ksz9477: do not keep the learned port in FDB entries Oleksij Rempel
2026-11-26 8:07 ` [PATCH net-next 3/5] net: dsa: microchip: ksz9477: do not learn addresses on the CPU port Oleksij Rempel
2026-11-26 8:07 ` [PATCH net-next 4/5] net: dsa: microchip: ksz9477: refuse FDB/MDB entries for trapped groups Oleksij Rempel
2026-11-26 8:07 ` [PATCH net-next 5/5] net: dsa: microchip: ksz9477: report the trapped link-local groups Oleksij Rempel
2026-11-26 10:23 ` Vladimir Oltean [this message]
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=awgHiY9mcEAD1C34@skbuf \
--to=olteanv@gmail.com \
--cc=UNGLinuxDriver@microchip.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=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=woojung.huh@microchip.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