]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Add an helper function to cleanup VLAN entries
authorIdo Schimmel <idosch@mellanox.com>
Thu, 20 Dec 2018 19:42:32 +0000 (19:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Dec 2018 23:48:54 +0000 (15:48 -0800)
commit053d00b2e4c123fe752e6f69ed1b6f0512b71d57
tree2b1ae26ca9a769c3ff37dbde5354e01964281cbd
parentb50d429ba626fdbb04754224618a4f4c0758cd10
mlxsw: spectrum: Add an helper function to cleanup VLAN entries

VLAN entries on a port can be associated with either a bridge VLAN or a
router port. Before the VLAN entry is destroyed these associations need
to be cleaned up.

Currently, this is always invoked from the function which destroys the
VLAN entry, but next patch is going to skip the destruction of the
default entry when a port in unlinked from a LAG.

The above does not mean that the associations should not be cleaned up,
so add a helper that will be invoked from both call sites.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c