mlxsw: spectrum: Always decrement bridge's ref count
Since we only support one VLAN filtering bridge we need to associate a
reference count with it, so that when the last port netdev leaves it, we
would know that a different bridge can be offloaded to hardware.
When a LAG device is memeber in a bridge and port netdevs are leaving
the LAG, we should always decrement the bridge's reference count, as it's
incremented for any port in the LAG.
Fixes: 4dc236c317
("mlxsw: spectrum: Handle port leaving LAG while bridged")
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>
This commit is contained in:
parent
4de13d7ed6
commit
912b1c89c5
@ -2358,9 +2358,7 @@ static int mlxsw_sp_port_lag_leave(struct mlxsw_sp_port *mlxsw_sp_port,
|
||||
if (mlxsw_sp_port->bridged) {
|
||||
mlxsw_sp_port_active_vlans_del(mlxsw_sp_port);
|
||||
mlxsw_sp_port_bridge_leave(mlxsw_sp_port, false);
|
||||
|
||||
if (lag->ref_count == 1)
|
||||
mlxsw_sp_master_bridge_dec(mlxsw_sp, NULL);
|
||||
mlxsw_sp_master_bridge_dec(mlxsw_sp, NULL);
|
||||
}
|
||||
|
||||
if (lag->ref_count == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user