mlxsw: spectrum_switchdev: Allow deletion of learned FDB entries
authorIdo Schimmel <idosch@mellanox.com>
Wed, 21 Nov 2018 08:02:48 +0000 (08:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Nov 2018 01:10:31 +0000 (17:10 -0800)
Allow users to delete learned FDB entries from the bridge's FDB before
enabling VxLAN learning.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c

index d3d1c1d00d988c1d942eb806b3d47951efe89939..b32a5ee57fb91a0fe79d6062622e85024e663690 100644 (file)
@@ -2770,7 +2770,8 @@ mlxsw_sp_switchdev_bridge_nve_fdb_event(struct mlxsw_sp_switchdev_event_work *
            switchdev_work->event != SWITCHDEV_FDB_DEL_TO_DEVICE)
                return;
 
-       if (!switchdev_work->fdb_info.added_by_user)
+       if (switchdev_work->event == SWITCHDEV_FDB_ADD_TO_DEVICE &&
+           !switchdev_work->fdb_info.added_by_user)
                return;
 
        if (!netif_running(dev))