Skip to contentSkip to conversation

net: dsa: b53: skip multicast entries for fdb_dump()

PATCH Applied Jonas Gorski 5 participants 6 messages Dec 17, 2025 – Dec 29, 2025

Subsystems (4)
lore
Share & tools
lore

Jonas Gorski

author maintainer
#0 lore raw

PATCH 1/1 net: dsa: b53: skip multicast entries for fdb_dump()

port_fdb_dump() is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes multicast entries.

So check if the entry is a multicast entry before passing it on to the callback().

Additionally, the port of those entries is a bitmask, not a port number, so any included entries would have even be for the wrong port.

Fixes 1da6df85c6fb ("net: dsa: b53: Implement ARL add/del/dump operations")
---
 drivers/net/dsa/b53/b53_common.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/dsa/b53/b53_common.c +3 -0
index a1a177713d99..2c4131ed7e30 100644
@@ -2169,6 +2169,9 @@ static int b53_fdb_copy(int port, const struct b53_arl_entry *ent,
 	if (!ent->is_valid)
 		return 0;
 
+	if (is_multicast_ether_addr(ent->mac))
+		return 0;
+
 	if (port != ent->port)
 		return 0;
 
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Jonas Gorski

port_fdb_dump() is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes multicast entries.

So check if the entry is a multicast entry before passing it on to the callback().

Additionally, the port of those entries is a bitmask, not a port number, so any included entries would have even be for the wrong port.

Fixes 1da6df85c6fb ("net: dsa: b53: Implement ARL add/del/dump operations")
Signature · 1 line
Florian
maintainer
#2 lore raw
In reply to Jonas Gorski
Quoted 2 lines · Jonas Gorski

port_fdb_dump() is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes multicast entries.

includes.

Andrew

maintainer
#3 lore raw
Quoted 5 lines · Andrew Lunn
Quoted 2 lines · Jonas Gorski

port_fdb_dump() is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes multicast entries.

includes.

Please do not resend just for the above. I'll (exceptionally) fix it while applying the patch.

Cheers,

Paolo

author maintainer
#4 lore raw
Quoted 10 lines · Paolo Abeni
Quoted 5 lines · Andrew Lunn
Quoted 2 lines · Jonas Gorski

port_fdb_dump() is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes multicast entries.

includes.

Please do not resend just for the above. I'll (exceptionally) fix it while applying the patch.

Thank you, I completely forgot about this over the holidays (and getting sick).

Though I also wasn't sure if a typo in the commit message warrants a new patch version; I sort of assumed this was more a "if a new version is needed, then fix this as well".

Best regards,
Jonas

#5 lore raw
In reply to Jonas Gorski
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

Quoted 10 lines · On Wed, 17 Dec 2025 21:57:56 +0100 you wrote:

port_fdb_dump() is supposed to only add fdb entries, but we iterate over the full ARL table, which also inludes multicast entries.

So check if the entry is a multicast entry before passing it on to the callback().

Additionally, the port of those entries is a bitmask, not a port number, so any included entries would have even be for the wrong port.

[...]

Here is the summary with links:
- [net] net: dsa: b53: skip multicast entries for fdb_dump()

    https://git.kernel.org/netdev/net/c/d42bce414d1c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html