]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite5089ebc438c3e9f6d35e4d750520f0aab3e085a
tree55287c47bbc9e4acb3515e47338c483e944bd484
parent06767402172f80b7aa7a3e2800a509ac88894b97
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