mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
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
1 changed files with 1 additions and 3 deletions
|
@ -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 a new issue