]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - drivers/net/ethernet/mellanox/mlxsw/spectrum.c
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)
commit1c800759078d400a02ed4ed1655672ea5fdcfd66
treed44ad9fd9bcb11fb163c4868d21b34669f9e09a5
parentfe3f6d144a843c9845d2eccb78fe72d1bebae0e9
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