Files
eternalwrt-mt798x/target/linux/generic/pending-6.12/711-04-net-dsa-qca8k-merge-host-fdb-for-multi-cpu.patch
T
John AudiaandRobert Marko 31f9f36625 kernel/x86: restore files for v6.12
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-28 11:51:10 +01:00

48 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kevin Staley <glaciertablet@gmail.com>
Date: Mon, 29 Dec 2025 00:00:00 +0000
Subject: [PATCH] net: dsa: qca8k: merge host FDB for multi-CPU setups
In multi-CPU-port setups, DSA may install the same host FDB entry on
multiple upstream-facing ports when bridged user ports use different
conduits. qca8k_port_fdb_add currently overwrites any existing entry for
the same {MAC, VID}, so the last CPU port wins and host reachability can
break for ports serviced by the other CPU port (e.g. Netgear R7800 when
wan is bridged into br-lan).
Use the existing search-and-insert/delete helpers for CPU and DSA ports
so the destination port mask is merged instead of replaced.
Fixes: openwrt/openwrt#17891
Signed-off-by: Kevin Staley <glaciertablet@gmail.com>
---
drivers/net/dsa/qca/qca8k-common.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/drivers/net/dsa/qca/qca8k-common.c
+++ b/drivers/net/dsa/qca/qca8k-common.c
@@ -836,6 +836,13 @@ int qca8k_port_fdb_add(struct dsa_switch
struct qca8k_priv *priv = ds->priv;
u16 port_mask = BIT(port);
+ if (!vid)
+ vid = QCA8K_PORT_VID_DEF;
+
+ if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
+ return qca8k_fdb_search_and_insert(priv, BIT(port), addr, vid,
+ QCA8K_ATU_STATUS_STATIC);
+
return qca8k_port_fdb_insert(priv, addr, port_mask, vid);
}
@@ -849,6 +856,9 @@ int qca8k_port_fdb_del(struct dsa_switch
if (!vid)
vid = QCA8K_PORT_VID_DEF;
+ if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
+ return qca8k_fdb_search_and_del(priv, BIT(port), addr, vid);
+
return qca8k_fdb_del(priv, addr, port_mask, vid);
}