]> 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)
commit43bc92208f60a36221a95cb520f6ce155fe5f090
treed44ad9fd9bcb11fb163c4868d21b34669f9e09a5
parentb86fddd7418ab21282f80e9450f93e48c0fa07d8
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