]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Use join / leave functions for vFID operations
authorIdo Schimmel <idosch@mellanox.com>
Mon, 20 Jun 2016 21:04:13 +0000 (23:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jun 2016 09:02:50 +0000 (05:02 -0400)
commit45572ca3d160dcea18d4953200d1a160b4853df0
treee23e7f12a7657d922db369673e30f1e00f494fb9
parentf76ad62bba1e905a0f7890504676fec0b24d78af
mlxsw: spectrum: Use join / leave functions for vFID operations

When a vPort is created or when it joins a bridge we always do the same
set of operations:

1) Create the vFID, if not already created
2) Setup flooding for the vFID
3) Map the {Port, VID} to the vFID

When a vPort is destroyed or when it leaves a bridge the reverse is
performed.

Encapsulate the above in join / leave functions and simplify the code.
FIDs and rFIDs will use a similar set of functions.

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