Commit ded711c8 authored by Nogah Frankel's avatar Nogah Frankel Committed by David S. Miller

mlxsw: spectrum_switchdev: Consider mrouter status for mdb changes

When a mrouter is registered or leaves a mid, don't update the HW.
Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01662777
...@@ -1491,6 +1491,9 @@ static int mlxsw_sp_port_mdb_add(struct mlxsw_sp_port *mlxsw_sp_port, ...@@ -1491,6 +1491,9 @@ static int mlxsw_sp_port_mdb_add(struct mlxsw_sp_port *mlxsw_sp_port,
if (!bridge_device->multicast_enabled) if (!bridge_device->multicast_enabled)
return 0; return 0;
if (bridge_port->mrouter)
return 0;
err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, true); err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, true);
if (err) { if (err) {
netdev_err(dev, "Unable to set SMID\n"); netdev_err(dev, "Unable to set SMID\n");
...@@ -1613,10 +1616,12 @@ __mlxsw_sp_port_mdb_del(struct mlxsw_sp_port *mlxsw_sp_port, ...@@ -1613,10 +1616,12 @@ __mlxsw_sp_port_mdb_del(struct mlxsw_sp_port *mlxsw_sp_port,
int err; 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 (bridge_port->bridge_device->multicast_enabled) {
err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid,
if (err) false);
netdev_err(dev, "Unable to remove port from SMID\n"); if (err)
netdev_err(dev, "Unable to remove port from SMID\n");
}
} }
err = mlxsw_sp_port_remove_from_mid(mlxsw_sp_port, mid); err = mlxsw_sp_port_remove_from_mid(mlxsw_sp_port, mid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment