Thread (10 messages) flat view 10 messages, 2 authors, 5d ago
COOLING5d

[RFC PATCH net-next v2 3/6] net: dsa: qca8k: flood unknown frames to all CPU ports

From: Brandon Mahdavi <hidden>
Date: 2026-08-02 03:47:23
Also in: lkml
Subsystem: networking drivers, networking [dsa], the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn, Vladimir Oltean, Linus Torvalds

From: Christian Marangi <ansuelsmth@gmail.com>

A multi-conduit setup requires unknown traffic to be eligible for
delivery through every CPU port. Program all DSA CPU ports into the
global IGMP, broadcast, multicast and unknown-unicast destination
masks.

Per-port lookup membership still controls which CPU port can receive
a frame from each user port, preventing duplicate delivery.

Link: https://github.com/openwrt/openwrt/commit/500dbaefd2a6a1c9c0d81e275a28c6a8e26519e4
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Brandon Mahdavi <redacted>
---
 drivers/net/dsa/qca/qca8k-8xxx.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/dsa/qca/qca8k-8xxx.c b/drivers/net/dsa/qca/qca8k-8xxx.c
index 9dce23aaed76..4adc5081d05d 100644
--- a/drivers/net/dsa/qca/qca8k-8xxx.c
+++ b/drivers/net/dsa/qca/qca8k-8xxx.c
@@ -1922,15 +1922,12 @@ qca8k_setup(struct dsa_switch *ds)
 		}
 	}
 
-	/* Forward all unknown frames to CPU port for Linux processing
-	 * Notice that in multi-cpu config only one port should be set
-	 * for igmp, unknown, multicast and broadcast packet
-	 */
+	/* Forward all unknown frames to CPU port for Linux processing */
 	ret = qca8k_write(priv, QCA8K_REG_GLOBAL_FW_CTRL1,
-			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_IGMP_DP_MASK, BIT(cpu_port)) |
-			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_BC_DP_MASK, BIT(cpu_port)) |
-			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_MC_DP_MASK, BIT(cpu_port)) |
-			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_UC_DP_MASK, BIT(cpu_port)));
+			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_IGMP_DP_MASK, dsa_cpu_ports(ds)) |
+			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_BC_DP_MASK, dsa_cpu_ports(ds)) |
+			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_MC_DP_MASK, dsa_cpu_ports(ds)) |
+			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_UC_DP_MASK, dsa_cpu_ports(ds)));
 	if (ret)
 		return ret;
 
-- 
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help