mlxsw: spectrum_switchdev: Flush port from MDB entries according to FID index
authorAmit Cohen <amcohen@nvidia.com>
Wed, 29 Jun 2022 09:40:06 +0000 (12:40 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jun 2022 12:35:46 +0000 (13:35 +0100)
commit4c3f7442770b6f9b83c88f83d7d43126340ae303
tree55287c47bbc9e4acb3515e47338c483e944bd484
parent7434ed6102c1a9b898affaeb0685cafd4cd7597c
mlxsw: spectrum_switchdev: Flush port from MDB entries according to FID index

Currently, flushing port from all MDB entries is done when the last VLAN
is removed. This behavior is inaccurate, as port can be removed while there
is another port which uses the same VLAN, in such case, this is not the
last port which uses this VLAN and removed, but this port is supposed to be
removed from the MDB entries.

Flush the port from MDB when it is removed, regardless the state of other
ports. Flush only the MDB entries which are relevant for the same FID
index.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c