* [PATCH net v3] net: dsa: mt7530: trap frames to conduit in MFC on EN7581 and AN7583
@ 2026-10-22 20:56 Tao Gong
2026-10-27 10:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Tao Gong @ 2026-10-22 20:56 UTC (permalink / raw)
To: netdev
Cc: Tao Gong, Lorenzo Bianconi, Chester A. Unal, Daniel Golle,
Andrew Lunn, Vladimir Oltean, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Matthias Brugger,
AngeloGioacchino Del Regno, Lorenzo Bianconi,
Arınç ÜNAL, Florian Fainelli, Christian Marangi,
linux-kernel, linux-arm-kernel, linux-mediatek
On EN7581, STP BPDUs received on switch user ports never reach the CPU.
Like MT7531 and MT7988, EN7581 and AN7583 only set the CPU port bitmap
in MT7531_CFC and are skipped by mt753x_conduit_state_change(). On
EN7581 this is not enough: trapped BPDUs reach the CPU only when
MT7530_CPU_EN and MT7530_CPU_PORT are also set in MT753X_MFC. Add
EN7581 and AN7583 to mt753x_conduit_state_change().
Tested on an AN7581 board (Gemtek W1700K, airoha,en7581-switch), where
only lan3 and lan4 are switch user ports. With RSTP BPDUs arriving on
lan4:
- without this patch, none reached the CPU;
- setting CPU_EN and CPU_PORT by hand delivered them, and clearing them
stopped them;
- with this patch, they are received from boot.
Only BPDUs were tested. AN7583 is untested and is included because the
driver sets it up like EN7581.
Fixes: 2b0229f67932 ("net: dsa: mt7530: Add EN7581 support")
Fixes: d76556db10bf ("net: dsa: mt7530: Add AN7583 support")
Acked-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
Signed-off-by: Tao Gong <gongtao0607@gmail.com>
---
v2 was withdrawn after 4cb3cd670b2a ("net: dsa: mt7530: untag
VLAN-aware bridge PVID") fixed what patch 1/2 addressed. Patch 2/2 was
dropped with it by mistake: the test that seemed to show it was not
needed received BPDUs on ports that do not go through the switch. On a
switch user port, BPDUs are still lost without it, as described above.
To Paolo's question on v2: the issue is seen on real hardware (AN7581).
The results above are from the OpenWrt 6.18.55 kernel with this patch
applied; the code involved is the same in net.
The board has a single CPU port, so the test does not show which of CFC
and MFC selects the destination CPU port on EN7581. The comment on the
CPU port bitmap in mt753x_cpu_port_enable() is left unchanged.
The MT753X_MIRROR_EN() issue on AN7583 found in the v2 review is
separate and not addressed here.
Changes in v3:
- Drop patch 1/2, fixed by 4cb3cd670b2a.
- Add a Fixes tag for AN7583.
- Update the comment in mt753x_conduit_state_change().
- Add test results to the commit message.
- Keep Lorenzo's Acked-by from v1: the code change is the same, only the
comment and the commit message changed.
v2: https://lore.kernel.org/netdev/20260923055103.949540-1-gongtao0607@gmail.com/
drivers/net/dsa/mt7530.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 96832852c65a..5dbcea38209f 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -3335,10 +3335,13 @@ mt753x_conduit_state_change(struct dsa_switch *ds,
/* Set the CPU port to trap frames to for MT7530. Trapped frames will be
* forwarded to the numerically smallest CPU port whose conduit
- * interface is up.
+ * interface is up. On EN7581, trapped BPDUs do not reach the CPU port
+ * without this, even with the CPU port bitmap set. AN7583 is set up
+ * the same way as EN7581.
*/
if (priv->id != ID_MT7530 && priv->id != ID_MT7621 &&
- priv->id != ID_EN7528)
+ priv->id != ID_EN7528 &&
+ priv->id != ID_EN7581 && priv->id != ID_AN7583)
return;
mask = BIT(cpu_dp->index);
base-commit: f4377bf85887f57b59abb5479f7660a81ffe4449
--
2.56.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net v3] net: dsa: mt7530: trap frames to conduit in MFC on EN7581 and AN7583
2026-10-22 20:56 [PATCH net v3] net: dsa: mt7530: trap frames to conduit in MFC on EN7581 and AN7583 Tao Gong
@ 2026-10-27 10:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-10-27 10:10 UTC (permalink / raw)
To: Tao Gong
Cc: netdev, lorenzo.bianconi, chester.a.unal, daniel, andrew,
olteanv, davem, edumazet, kuba, pabeni, matthias.bgg,
angelogioacchino.delregno, lorenzo, arinc.unal, florian.fainelli,
ansuelsmth, linux-kernel, linux-arm-kernel, linux-mediatek
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 22 Oct 2026 20:56:48 +0000 you wrote:
> On EN7581, STP BPDUs received on switch user ports never reach the CPU.
>
> Like MT7531 and MT7988, EN7581 and AN7583 only set the CPU port bitmap
> in MT7531_CFC and are skipped by mt753x_conduit_state_change(). On
> EN7581 this is not enough: trapped BPDUs reach the CPU only when
> MT7530_CPU_EN and MT7530_CPU_PORT are also set in MT753X_MFC. Add
> EN7581 and AN7583 to mt753x_conduit_state_change().
>
> [...]
Here is the summary with links:
- [net,v3] net: dsa: mt7530: trap frames to conduit in MFC on EN7581 and AN7583
https://git.kernel.org/netdev/net/c/a58b221496dd
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-27 10:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-22 20:56 [PATCH net v3] net: dsa: mt7530: trap frames to conduit in MFC on EN7581 and AN7583 Tao Gong
2026-10-27 10:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®