netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: dsa: silence fdb errors when unsupported
@ 2022-03-09 10:35 Russell King (Oracle)
  2022-03-09 10:41 ` Vladimir Oltean
  0 siblings, 1 reply; 6+ messages in thread
From: Russell King (Oracle) @ 2022-03-09 10:35 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: David S. Miller, netdev, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, Jakub Kicinski

When booting with a Marvell 88e6xxx switch, the kernel spits out a
load of:

[    7.820996] mv88e6085 f1072004.mdio-mii:04: port 3 failed to add aa:bb:cc:dd:ee:ff vid XYZ1 to fdb: -95
[    7.835717] mv88e6085 f1072004.mdio-mii:04: port 2 failed to add aa:bb:cc:dd:ee:ff vid XYZ1 to fdb: -95
[    7.851090] mv88e6085 f1072004.mdio-mii:04: port 1 failed to add aa:bb:cc:dd:ee:ff vid XYZ1 to fdb: -95
[    7.968594] mv88e6085 f1072004.mdio-mii:04: port 0 failed to add aa:bb:cc:dd:ee:ff vid XYZ1 to fdb: -95
[    8.035408] mv88e6085 f1072004.mdio-mii:04: port 3 failed to add aa:bb:cc:dd:ee:ff vid XYZ3 to fdb: -95

while the switch is being setup. Comments in the Marvell DSA driver
indicate that "switchdev expects -EOPNOTSUPP to honor software VLANs"
in mv88e6xxx_port_db_load_purge() so this error code should not be
treated as an error.

Fixes: 3dc80afc5098 ("net: dsa: introduce a separate cross-chip notifier type for host FDBs")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
Hi,

I noticed these errors booting 5.16 on my Clearfog platforms with a
Marvell DSA switch. It appears that the switch continues to work
even though these errors are logged in the kernel log, so this patch
merely silences the errors, but I'm unsure this is the right thing
to do.

 net/dsa/slave.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 22241afcac81..e8f4a59022a8 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -2411,7 +2411,7 @@ static void dsa_slave_switchdev_event_work(struct work_struct *work)
 		else
 			err = dsa_port_fdb_add(dp, switchdev_work->addr,
 					       switchdev_work->vid);
-		if (err) {
+		if (err && err != -EOPNOTSUPP) {
 			dev_err(ds->dev,
 				"port %d failed to add %pM vid %d to fdb: %d\n",
 				dp->index, switchdev_work->addr,
@@ -2428,7 +2428,7 @@ static void dsa_slave_switchdev_event_work(struct work_struct *work)
 		else
 			err = dsa_port_fdb_del(dp, switchdev_work->addr,
 					       switchdev_work->vid);
-		if (err) {
+		if (err && err != -EOPNOTSUPP) {
 			dev_err(ds->dev,
 				"port %d failed to delete %pM vid %d from fdb: %d\n",
 				dp->index, switchdev_work->addr,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-09 16:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-09 10:35 [PATCH net] net: dsa: silence fdb errors when unsupported Russell King (Oracle)
2022-03-09 10:41 ` Vladimir Oltean
2022-03-09 14:18   ` Russell King (Oracle)
2022-03-09 15:51     ` Vladimir Oltean
2022-03-09 16:06       ` Russell King (Oracle)
2022-03-09 16:19         ` Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).