]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Handle port leaving LAG while bridged
authorIdo Schimmel <idosch@mellanox.com>
Wed, 27 Jan 2016 14:20:16 +0000 (15:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Jan 2016 23:55:30 +0000 (15:55 -0800)
commitc174c9bde7cbaeadb2109bcab592aedabc783a23
tree67757128ebcbf6a448f0d2e78a0168ed5bebc436
parent6b212d10bd43bab091926550c9d0a53b3478b8ca
mlxsw: spectrum: Handle port leaving LAG while bridged

It is possible for a user to remove a port from a LAG device, while the
LAG device or VLAN devices on top of it are bridged. In these cases,
bridge's teardown sequence is never issued, so we need to take care of
it ourselves.

When LAG's unlinking event is received by port netdev:

1) Traverse its vPorts list and make those member in a bridge leave it.
   They will be deleted later by LAG code.

2) Make the port netdev itself leave its bridge if member in one.

Fixes: cb2e979e737b ("mlxsw: spectrum: Implement LAG port join/leave")
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>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c