1 From 2fd186501b1cff155cc4a755c210793cfc0dffb5 Mon Sep 17 00:00:00 2001
2 From: Vladimir Oltean <vladimir.oltean@nxp.com>
3 Date: Wed, 6 Jan 2021 11:51:31 +0200
4 Subject: [PATCH] net: dsa: be louder when a non-legacy FDB operation fails
6 The dev_close() call was added in commit c9eb3e0f8701 ("net: dsa: Add
7 support for learning FDB through notification") "to indicate inconsistent
8 situation" when we could not delete an FDB entry from the port.
10 bridge fdb del d8:58:d7:00:ca:6d dev swp0 self master
12 It is a bit drastic and at the same time not helpful if the above fails
13 to only print with netdev_dbg log level, but on the other hand to bring
16 So increase the verbosity of the error message, and drop dev_close().
18 Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
19 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
20 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
21 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
23 net/dsa/slave.c | 10 +++++++---
24 1 file changed, 7 insertions(+), 3 deletions(-)
28 @@ -2075,7 +2075,9 @@ static void dsa_slave_switchdev_event_wo
30 err = dsa_port_fdb_add(dp, fdb_info->addr, fdb_info->vid);
32 - netdev_dbg(dev, "fdb add failed err=%d\n", err);
34 + "failed to add %pM vid %d to fdb: %d\n",
35 + fdb_info->addr, fdb_info->vid, err);
38 fdb_info->offloaded = true;
39 @@ -2090,9 +2092,11 @@ static void dsa_slave_switchdev_event_wo
41 err = dsa_port_fdb_del(dp, fdb_info->addr, fdb_info->vid);
43 - netdev_dbg(dev, "fdb del failed err=%d\n", err);
46 + "failed to delete %pM vid %d from fdb: %d\n",
47 + fdb_info->addr, fdb_info->vid, err);