Skip to content

Commit c7f46cc

Browse files
idoschdavem330
authored andcommitted
mlxsw: spectrum_switchdev: Do not remove mrouter port from MDB's ports list
When IGMP snooping is enabled on a bridge, traffic forwarded by an MDB entry should be sent to both ports member in the MDB's ports list and mrouter ports. In case a port needs to be removed from an MDB's ports list, but this port is also configured as an mrouter port, then do not update the device so that it will continue to forward traffic through that port. Fix a copy-paste error that checked that IGMP snooping is enabled twice instead of checking the port's mrouter state. Fixes: ded711c ("mlxsw: spectrum_switchdev: Consider mrouter status for mdb changes") Signed-off-by: Ido Schimmel <[email protected]> Reported-by: Colin King <[email protected]> Reviewed-by: Nogah Frankel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6a9a27d commit c7f46cc

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,13 +1718,11 @@ __mlxsw_sp_port_mdb_del(struct mlxsw_sp_port *mlxsw_sp_port,
17181718
struct net_device *dev = mlxsw_sp_port->dev;
17191719
int err;
17201720

1721-
if (bridge_port->bridge_device->multicast_enabled) {
1722-
if (bridge_port->bridge_device->multicast_enabled) {
1723-
err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid,
1724-
false);
1725-
if (err)
1726-
netdev_err(dev, "Unable to remove port from SMID\n");
1727-
}
1721+
if (bridge_port->bridge_device->multicast_enabled &&
1722+
!bridge_port->mrouter) {
1723+
err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, false);
1724+
if (err)
1725+
netdev_err(dev, "Unable to remove port from SMID\n");
17281726
}
17291727

17301728
err = mlxsw_sp_port_remove_from_mid(mlxsw_sp_port, mid);

0 commit comments

Comments
 (0)