]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Free resources upon vPort destruction
authorIdo Schimmel <idosch@mellanox.com>
Mon, 20 Jun 2016 21:04:20 +0000 (23:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jun 2016 09:02:51 +0000 (05:02 -0400)
commitecaf6b2d00235e3cdf6414fac67d483cdd4ee887
treed44ad9fd9bcb11fb163c4868d21b34669f9e09a5
parent25b3f17553bd6ac773d85bb7ac198a21ed30150c
mlxsw: spectrum: Free resources upon vPort destruction

There are situations in which a vPort is destroyed while still holding
references to device's resources such as FIDs and FDB records. This can
happen, for example, when a VLAN device is deleted while still being
bridged.

Instead of trying to make sure vPort destruction is invoked when it no
longer uses device's resources, just free them upon destruction. This
simplifies the code, as we no longer need to take different situations
into account when events are received - cleanup is taken care of in one
place.

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