mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
920eaab1d8
Marvell mv88e6xxx switch series cannot perform MAC learning from CPU-injected (FROM_CPU) DSA frames, which results in 2 issues. - excessive flooding, due to the fact that DSA treats those addresses as unknown - the risk of stale routes, which can lead to temporary packet loss Backport those patch series from netdev mailing list, which solve these issues by adding and clearing static entries to the switch's FDB. Add a hack patch to set default VID to 1 in port_fdb_{add,del}. Otherwise the static entries will be added to the switch's private FDB if VLAN filtering disabled, which will not work. The switch may generate an "ATU violation" warning when a client moves from the CPU port to a switch port because the static ATU entry added by DSA core still points to the CPU port. DSA core will then clear the static entry so it is not fatal. Disable the warning so it will not confuse users. Link: https://lore.kernel.org/netdev/20210106095136.224739-1-olteanv@gmail.com/ Link: https://lore.kernel.org/netdev/20210116012515.3152-1-tobias@waldekranz.com/ Ref: https://gitlab.nic.cz/turris/turris-build/-/issues/165 Signed-off-by: DENG Qingfang <dqfext@gmail.com>
53 lines
1.7 KiB
Diff
53 lines
1.7 KiB
Diff
From 2fd186501b1cff155cc4a755c210793cfc0dffb5 Mon Sep 17 00:00:00 2001
|
|
From: Vladimir Oltean <vladimir.oltean@nxp.com>
|
|
Date: Wed, 6 Jan 2021 11:51:31 +0200
|
|
Subject: [PATCH] net: dsa: be louder when a non-legacy FDB operation fails
|
|
|
|
The dev_close() call was added in commit c9eb3e0f8701 ("net: dsa: Add
|
|
support for learning FDB through notification") "to indicate inconsistent
|
|
situation" when we could not delete an FDB entry from the port.
|
|
|
|
bridge fdb del d8:58:d7:00:ca:6d dev swp0 self master
|
|
|
|
It is a bit drastic and at the same time not helpful if the above fails
|
|
to only print with netdev_dbg log level, but on the other hand to bring
|
|
the interface down.
|
|
|
|
So increase the verbosity of the error message, and drop dev_close().
|
|
|
|
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
|
|
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
|
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
net/dsa/slave.c | 10 +++++++---
|
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
--- a/net/dsa/slave.c
|
|
+++ b/net/dsa/slave.c
|
|
@@ -1590,7 +1590,9 @@ static void dsa_slave_switchdev_event_wo
|
|
|
|
err = dsa_port_fdb_add(dp, fdb_info->addr, fdb_info->vid);
|
|
if (err) {
|
|
- netdev_dbg(dev, "fdb add failed err=%d\n", err);
|
|
+ netdev_err(dev,
|
|
+ "failed to add %pM vid %d to fdb: %d\n",
|
|
+ fdb_info->addr, fdb_info->vid, err);
|
|
break;
|
|
}
|
|
fdb_info->offloaded = true;
|
|
@@ -1605,9 +1607,11 @@ static void dsa_slave_switchdev_event_wo
|
|
|
|
err = dsa_port_fdb_del(dp, fdb_info->addr, fdb_info->vid);
|
|
if (err) {
|
|
- netdev_dbg(dev, "fdb del failed err=%d\n", err);
|
|
- dev_close(dev);
|
|
+ netdev_err(dev,
|
|
+ "failed to delete %pM vid %d from fdb: %d\n",
|
|
+ fdb_info->addr, fdb_info->vid, err);
|
|
}
|
|
+
|
|
break;
|
|
}
|
|
rtnl_unlock();
|