All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: dsa: mt7530: Fix traffic flooding for MMIO devices
@ 2025-03-04  8:50 Lorenzo Bianconi
  2025-03-04  9:46 ` Chester A. Unal
  2025-03-06  3:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2025-03-04  8:50 UTC (permalink / raw)
  To: Chester A. Unal, Daniel Golle, DENG Qingfang, Sean Wang,
	Andrew Lunn, Vladimir Oltean, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: netdev, linux-arm-kernel, linux-mediatek, Lorenzo Bianconi

On MMIO devices (e.g. MT7988 or EN7581) unicast traffic received on lanX
port is flooded on all other user ports if the DSA switch is configured
without VLAN support since PORT_MATRIX in PCR regs contains all user
ports. Similar to MDIO devices (e.g. MT7530 and MT7531) fix the issue
defining default VLAN-ID 0 for MT7530 MMIO devices.

Fixes: 110c18bfed414 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/dsa/mt7530.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 1c83af805209cae40c56138fa8f72261e396f58c..5883eb93efb11423bec260a11ff8b60cfff1fd2c 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2591,7 +2591,8 @@ mt7531_setup_common(struct dsa_switch *ds)
 	if (ret < 0)
 		return ret;
 
-	return 0;
+	/* Setup VLAN ID 0 for VLAN-unaware bridges */
+	return mt7530_setup_vlan0(priv);
 }
 
 static int
@@ -2687,11 +2688,6 @@ mt7531_setup(struct dsa_switch *ds)
 	if (ret)
 		return ret;
 
-	/* Setup VLAN ID 0 for VLAN-unaware bridges */
-	ret = mt7530_setup_vlan0(priv);
-	if (ret)
-		return ret;
-
 	ds->assisted_learning_on_cpu_port = true;
 	ds->mtu_enforcement_ingress = true;
 

---
base-commit: 64e6a754d33d31aa844b3ee66fb93ac84ca1565e
change-id: 20250304-mt7988-flooding-fix-cdfec66a0640

Best regards,
-- 
Lorenzo Bianconi <lorenzo@kernel.org>



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

* Re: [PATCH net] net: dsa: mt7530: Fix traffic flooding for MMIO devices
  2025-03-04  8:50 [PATCH net] net: dsa: mt7530: Fix traffic flooding for MMIO devices Lorenzo Bianconi
@ 2025-03-04  9:46 ` Chester A. Unal
  2025-03-06  3:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Chester A. Unal @ 2025-03-04  9:46 UTC (permalink / raw)
  To: Lorenzo Bianconi, Daniel Golle, DENG Qingfang, Sean Wang,
	Andrew Lunn, Vladimir Oltean, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: netdev, linux-arm-kernel, linux-mediatek

On 04/03/2025 08:50, Lorenzo Bianconi wrote:
> On MMIO devices (e.g. MT7988 or EN7581) unicast traffic received on lanX
> port is flooded on all other user ports if the DSA switch is configured
> without VLAN support since PORT_MATRIX in PCR regs contains all user
> ports. Similar to MDIO devices (e.g. MT7530 and MT7531) fix the issue
> defining default VLAN-ID 0 for MT7530 MMIO devices.
> 
> Fixes: 110c18bfed414 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

I was suspecting of this for a while. Thanks for addressing it.

Reviewed-by: Chester A. Unal <chester.a.unal@arinc9.com>

Chester A.


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

* Re: [PATCH net] net: dsa: mt7530: Fix traffic flooding for MMIO devices
  2025-03-04  8:50 [PATCH net] net: dsa: mt7530: Fix traffic flooding for MMIO devices Lorenzo Bianconi
  2025-03-04  9:46 ` Chester A. Unal
@ 2025-03-06  3:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-03-06  3:30 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: chester.a.unal, daniel, dqfext, sean.wang, andrew, olteanv, davem,
	edumazet, kuba, pabeni, matthias.bgg, angelogioacchino.delregno,
	netdev, linux-arm-kernel, linux-mediatek

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 04 Mar 2025 09:50:23 +0100 you wrote:
> On MMIO devices (e.g. MT7988 or EN7581) unicast traffic received on lanX
> port is flooded on all other user ports if the DSA switch is configured
> without VLAN support since PORT_MATRIX in PCR regs contains all user
> ports. Similar to MDIO devices (e.g. MT7530 and MT7531) fix the issue
> defining default VLAN-ID 0 for MT7530 MMIO devices.
> 
> Fixes: 110c18bfed414 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> 
> [...]

Here is the summary with links:
  - [net] net: dsa: mt7530: Fix traffic flooding for MMIO devices
    https://git.kernel.org/netdev/net/c/ccc2f5a436fb

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] 3+ messages in thread

end of thread, other threads:[~2025-03-06  3:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-04  8:50 [PATCH net] net: dsa: mt7530: Fix traffic flooding for MMIO devices Lorenzo Bianconi
2025-03-04  9:46 ` Chester A. Unal
2025-03-06  3:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.