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

From: Brandon Mahdavi

Date: Sat Aug 01 2026 - 23:51:27 EST


From: Christian Marangi <ansuelsmth@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Brandon Mahdavi <brandon.mahdavi@xxxxxxxxxx>
---
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