]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_switchdev: Release multicast groups during fini
authorIdo Schimmel <idosch@mellanox.com>
Fri, 4 Aug 2017 12:12:30 +0000 (14:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Aug 2017 18:15:07 +0000 (11:15 -0700)
commit486b1436bf4a126dbf1182e44acea9b9239a16dd
tree71a66a1f9bfd1283f9e4b8b83ed14216f73fa587
parent1238d1959d83368e0baf46af9e4a6720dd0a4d66
mlxsw: spectrum_switchdev: Release multicast groups during fini

Each multicast group (MID) stores a bitmap of ports to which a packet
should be forwarded to in case an MDB entry associated with the MID is
hit.

Since the initial introduction of IGMP snooping in commit ff14ef22bfb8
("mlxsw: Adding layer 2 multicast support") the driver didn't correctly
free these multicast groups upon ungraceful situations such as the
removal of the upper bridge device or module removal.

The correct way to fix this is to associate each MID with the bridge
ports member in it and then drop the reference in case the bridge port
is destroyed, but this will result in a lot more code and will be fixed
in net-next.

For now, upon module removal, traverse the MID list and release each
one.

Fixes: ff14ef22bfb8 ("mlxsw: Adding layer 2 multicast support")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c