提交 c7f46cca 编写于 作者: I Ido Schimmel 提交者: David S. Miller

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: ded711c8 ("mlxsw: spectrum_switchdev: Consider mrouter status for mdb changes")
Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
Reported-by: NColin King <colin.king@canonical.com>
Reviewed-by: NNogah Frankel <nogahf@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6a9a27d5
......@@ -1718,13 +1718,11 @@ __mlxsw_sp_port_mdb_del(struct mlxsw_sp_port *mlxsw_sp_port,
struct net_device *dev = mlxsw_sp_port->dev;
int err;
if (bridge_port->bridge_device->multicast_enabled) {
if (bridge_port->bridge_device->multicast_enabled) {
err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid,
false);
if (err)
netdev_err(dev, "Unable to remove port from SMID\n");
}
if (bridge_port->bridge_device->multicast_enabled &&
!bridge_port->mrouter) {
err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, false);
if (err)
netdev_err(dev, "Unable to remove port from SMID\n");
}
err = mlxsw_sp_port_remove_from_mid(mlxsw_sp_port, mid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册