Article View: linux.kernel.netdev
Article #25200[PATCH net-next v2 0/7] net: dsa: microchip: let the bridge decide about link-local frames
From: Oleksij Rempel
Date: Tue, 01 Dec 2026 11:59
Date: Tue, 01 Dec 2026 11:59
68 lines
13567 bytes
13567 bytes
On networks of KSZ9893-based devices, we saw frames take unexpected
paths and suspected a loop. With STP off, the KSZ bridges could not
help to find it: unlike a software bridge, they did not relay BPDUs,
so other bridges could not detect a loop through them. With STP on, we
hit other problems, fixed in net-next by the series merged in
6e0542a18a75 ("Merge branch
'net-dsa-make-a-shorter-bridge-ageing-time-take-effect'").
A Linux bridge with STP off relays BPDUs between its ports (commit
a598f6aebea2 ("bridge: relay bridge multicast pkgs if !STP")), and so do
bridges on mv88e6xxx and b53 switches. On the KSZ9477 family and
LAN937x, the switch traps BPDUs to the CPU, and the tagger marks them as
forwarded in hardware, so the bridge never sends them to the other ports
of the switch.
This series leaves trapped link-local frames unmarked, with a new DSA
helper. As a side effect, group_fwd_mask now also works for most other
trapped groups. The other patches handle what follows from that. FDB and
MDB entries for these groups would bypass the trap, so the driver
refuses them. The bridge now sends such frames back through the CPU
port, so the CPU port no longer learns addresses. That makes an old FDB
bug easy to hit; without the series it is hard to hit, so its fix comes
with the series to net-next.
The ksz8.c switches keep their behaviour. On the KSZ88x3 and KSZ8463
the static MAC table has only 8 entries, and of the ksz8.c switches I
can test only a KSZ8873.
To reproduce on a KSZ9893, with link partners on lan1 and lan2:
ip link add br0 type bridge # STP off by default
ip link set lan1 master br0 up; ip link set lan2 master br0 up
ip link set br0 up
# Send BPDUs (01:80:C2:00:00:00) into lan1. Without the series none
# reach lan2; with it, all do.
Tested on a KSZ9893.
Changes in v2:
- Link to v1: https://lore.kernel.org/r/20261126-ksz-stp-link-local-v1-0-39aed15f6271@pengutronix.de
---
Oleksij Rempel (7):
net: dsa: add dsa_link_local_offload_fwd_mark()
net: dsa: tag_mxl862xx: use dsa_link_local_offload_fwd_mark()
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 | 103 ++++++++++++++++++++++++++++---
drivers/net/dsa/microchip/ksz_common.c | 9 +++
drivers/net/dsa/microchip/ksz_common.h | 10 +++
drivers/net/dsa/microchip/lan937x_main.c | 10 +--
include/linux/dsa/ksz_common.h | 5 ++
net/dsa/tag.h | 25 ++++++++
net/dsa/tag_ksz.c | 25 +++++++-
net/dsa/tag_mxl862xx.c | 3 +-
8 files changed, 169 insertions(+), 21 deletions(-)
---
base-commit: d7f7fac1c3220a430559c6d43904e27917ae1eb0
change-id: 20261125-ksz-stp-link-local-5c53396cc960
Best regards,
--
Oleksij Rempel <o.rempel@pengutronix.de>
Technical Details
Message-ID:
<20261201-ksz-stp-link-local-v2-0-5dd1201d67c6@pengutronix.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374988-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374988-linux-kernel-netdev=dewy.ru From: o.rempel@pengutronix.de (Oleksij Rempel) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v2 0/7] net: dsa: microchip: let the bridge decide about link-local frames Date: Tue, 01 Dec 2026 12:59:43 +0100 Organization: Usenet Network Message-ID: <20261201-ksz-stp-link-local-v2-0-5dd1201d67c6@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1702863"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:B7R/P2Dvn3BCPYMb1INgfxa0daw= sha256:uO+ygwfuheXHWcuzKCcFXCWxFVACECLQaqDPmW1RxG4= sha1:jRdPQ3YvTXtsMU3ZgpkpVjGwhFM= sha256:3GUjTlyE9mCUkBWWUSmCyU53n0NcPH6twJDJUVy+vEI= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 3035A117359; Tue, 1 Dec 2026 15:00:19 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=pengutronix.de X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LDfOcVi4dDwg; Tue, 1 Dec 2026 15:00:15 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374988-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=pengutronix.de X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 36D54117352; Tue, 1 Dec 2026 15:00:06 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 4FA0A2B64A; Tue, 1 Dec 2026 11:59:59 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796126396; b=vlE/anPRkIpEprM0+NHHJR5TW0qhrkInCYK4shbDKVeKru0EFO7fYoGOgCbBpVV462j4 iREtSxzMEVz7PGBHnMiaHxEYjf5MB29BV6g7UdLu+9dbWWdJq2aG/PqeZGMHdzz3Wh+1l hPewFvl30a9wrFyrN97nkgoH9So+JVE1KBE0IqSfPI0i1iYUhekBo9zpigf4LF6tzOXA8 Y1cv/PyVwbn2TtY9aXG1u6KTFwcHiE+SIOp30TamUUoI4SL1jLUqpkDB0FZPqf5hfVstq pCD3vV9LGA3eF6L+tDw3usVzIIAkklarKLDOlHoWMvjQLa7f0JBouFwT5JjM4xNIgKQ== X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796126396; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:Received: From:Subject:Date:Message-Id:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer; bh=2B43NpGPe8HJUNuQfGGICZ6nqPGMvpGxWxMxfbT4EuU=; b=ffoeVEQY4GegCDmNRpwNjd5B2PvRD3+e8YeTvs63SAZJ9YwFKjH7oJ71kyk3pF3gban3 CZZDe4+ZdxQ2/T+APeZA3kttEXoFmdoxU7fqnogLSKF22sKtVIdoqbEuOD2rts+WTqSs/ KP6GP4s6nYGXFZ0xtCChEfQMOai0dQoGNqaooXXF/PI5UrSlhTSNSxvp/lrRpIsml+UiH d01qcl54QY2LbpmTS9bQ4Ph2RnGTEf5mhHQutEaNekNXmtLVorypfvH+3iuCBJLLt0LXV 7GTQsyjsjvdkB/qItqFAGXy2qivZlp9lAGuli5OFEgszz36RCQrvqZnJi11JILDXh3w== X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=pengutronix.de header.i=@pengutronix.de header.a=rsa-sha256 header.s=20260414 header.b=MpKYMgG0; dmarc=none header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2C01606A689; Tue, 1 Dec 2026 11:59:56 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pengutronix.de header.i=@pengutronix.de header.a=rsa-sha256 header.s=20260414 header.b=MpKYMgG0 X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=185.203.200.13 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796126395; b=1cf22flJuM7hIoyMNqi1z3YXzkRuxP5up+OxhXy4x09EHi48JOR1WgB9r0EoECN1JLeM 8IPACvTF5G/odK0k5pOSaGbtYtceJLYj91r+RJkHlceLE1OO9ZJAANVu3xpSgHiSnyG7V fBO2PTE1PSBv7pt4Adr+yjMSaVw7y5N2gHleqUhhBvekJS6Qg1DA07oGg/dki3VZ6m2ZB /ONk1qKhIlZ5CEw0m4P3283qEht6lKOCZ6cF5pdTYKAW+3Wegldm2cvZVH0SfGxPnI31T Kzz0CbRftf877DivmU9+Sc15pOIcL+Yit7nKs+SBU9mHFUyVNxrlfnbWWuiKaaQJqWQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796126395; h=DMARC-Filter:Received:DKIM-Signature:Received:From:Subject:Date: Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding: X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer; bh=2B43NpGPe8HJUNuQfGGICZ6nqPGMvpGxWxMxfbT4EuU=; b=TvbehtpNsC3GWOR6tvGh6JQo/XO7H87e4bAMKsty0MASe4qTo/DWSYphLfcQp/TudBb7 u01zQHoC3yfc6XJ3jl1Qo/vEQkVa/c0JX68oemAB8whC+ypefx3M/CuKzntbF9peU+IXg X1RS3vTNHsEhbnFdwAXKfuSW80OTe4xU+kr3k7YJCrFRexJOOQ9z+divbFtTTpaCv0LVF davL4I4dniYR72qnnwA2qft6Qwj20UvhDNpzbblfjguvzVy49RFZI3Nfwm0DAmlzosnXa yBgULvAjc4WwuE+NRFyS2HlyGr+s/UyasM1ATIn6vK6FModem/Q4HsvaUsh+D72ozXA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; dkim=pass header.d=pengutronix.de header.i=@pengutronix.de header.a=rsa-sha256 header.s=20260414 header.b=MpKYMgG0; arc=pass header.oldest-pass=0 smtp.remote-ip=185.203.200.13 X-Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E5F1606A32C for <netdev@vger.kernel.org>; Tue, 1 Dec 2026 11:59:54 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9E5F1606A32C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de X-Received: from dude04.red.stw.pengutronix.de (dude04.red.stw.pengutronix.de [IPv6:2a0a:edc0:0:1101:1d::ac]) (Authenticated sender: relay-from-dude04.red.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id 407FE200033; Tue, 01 Dec 2026 12:59:48 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pengutronix.de; s=20260414; t=1796126388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2B43NpGPe8HJUNuQfGGICZ6nqPGMvpGxWxMxfbT4EuU=; b=MpKYMgG02bPn8LB51CPnsYAclr0+jwnn8e6UaJpEsslWBTir+rIn6EMMEHPfdNssnW/ucv hCwHUTHGqb8z5sJ0KJrZtS9jSgrK8NzSsZnHezlXQQRati///r4le4ySwsBIBYIYtNfwyo DRawLmpJ7BMHScR8ALxWJfILEH8Xhevh5ir09TLyOD0xy9AUht6qEyrDCcu9yFUxlF7ATz i7P/51krCJVTTf/FNeuwXTYu5R19iRjNARPS8TjkUsHqLp7j/XDZFAHOZbS0JNW2remK7Z K7qG0I0g8S3hJ/foxpMuyiWvx2pHSHJ+EoGjIq5IwrwBJ8AngC2ixIIgM6vd0w== X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=pengutronix.de; s=20260414; t=1796126388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2B43NpGPe8HJUNuQfGGICZ6nqPGMvpGxWxMxfbT4EuU=; b=gkXi7RRGNNG0dWP9XCyccb1TbvpByJjEqheBpq/7TZjHcqQL7Ca/hmtMWlSgnz7qQj47wy GRPwS3xI2llUmxY6Ev/ZZFvDvYKGS4I5w6MFxi6Xhm4QWVJRcKstxgnap+YlgHSDMr30d2 VGt0hemKhWn7B35oKyS/sh5Gji109HHadPyH6ryisDUZTTr6NPv4/7S1TWAqp2jJ90WUPC iiET1qxJHLt36XnPNvUzmRHUTdeNXzEys8Pu1xA2u/tE31Wrx3+eBbL/GHyy67F8JjrdEU b++UVa5wu5vKbOsnzF7LvJG3wUCqCQVetLVjpmfDvWPQwDdezw3qzWpQpeTe1A== X-ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=relay-from-dude04.red.stw.pengutronix.de smtp.mailfrom=ore@pengutronix.de X-ARC-Seal: i=1; s=20260414; d=pengutronix.de; t=1796126388; a=rsa-sha256; cv=none; b=MCLegCHSoxAVhosNkM44LK/s0faejb9clupB6pet4WOgYqmImKbING1UOX17dvsP/P3636 PCrjB1cJ4rrNIilcJAtVef+L1Nu6FaVHRYAjgRgt4003UD3GqP9+P+V0PxnknvVz33mB2D iIS3lIndTfFhPwP3pgWJUJC6QVP/QNDWvpHTog2Rz0ID02M/jupi2lftPD+kCAQpivC12x aupCU0v76Io7M5FncH8RcP4nXB/UoRMGL27yZ8A/aSzwc481PKbqRXhnpsYU7Sm5jJ4Mxw VFEn3FhwQQTLS3TpngW8ydwDVikPD6H689WkN2mrlRwZVby7y3O7NXJxyY4KBA== X-Received: by dude04.red.stw.pengutronix.de (Postfix, from userid 1058) id 337863808B5; Tue, 01 Dec 2026 12:59:48 +0100 (CET) X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-B4-Tracking: v=1; b=H4sIALC2DmsC/22OwQ6CMBBEf8Xs2VVaQg2e/A/DoZYFNuBC2kpQw 78LRG8eJzPzZt4QyDMFOO/e4GnkwL0sQu934BorNSGXiwadaKOUzrANLwxxwI6lxa53tsPMZWm aG+dyk8BSHDxVPG3QKwhFFJoiFItzs4Hw5q24ZoWWdqQ7/hLHu2VZ+w2H2Pvn9mlUG+U7b/7Nj woTTHNLpcoqo0/qMpDUj+h74elQEhTzPH8AUtmDCOkAAAA= X-Change-ID: 20261125-ksz-stp-link-local-5c53396cc960 X-Cc: 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, Oleksij Rempel <o.rempel@pengutronix.de> X-Mailer: b4 0.14.2