diff options
author | Ido Schimmel <idosch@mellanox.com> | 2016-06-20 23:04:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-21 05:02:50 -0400 |
commit | 14d39461b3f4f0f827db64a2f1fc7bc44c452684 (patch) | |
tree | b4f05739446bea261c7be508d0ab7460950a3683 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h | |
parent | 37286d2571ccc8eda60970074ea0cd641e39fa05 (diff) | |
download | op-kernel-dev-14d39461b3f4f0f827db64a2f1fc7bc44c452684.zip op-kernel-dev-14d39461b3f4f0f827db64a2f1fc7bc44c452684.tar.gz |
mlxsw: spectrum: Use per-FID struct for the VLAN-aware bridge
In a very similar way to the vFIDs, make the first 4K FIDs - used in the
VLAN-aware bridge - use the new FID struct.
Upon first use of the FID by any of the ports do the following:
1) Create the FID
2) Setup a matching flooding entry
3) Create a mapping for the FID
Unlike vFIDs, upon creation of a FID we always create a global
VID-to-FID mapping, so that ports without upper vPorts can use it
instead of creating an explicit {Port, VID} to FID mapping.
When a port leaves a FID the reverse is performed. Whenever the FID's
reference count reaches zero the FID is deleted along with the global
mapping.
The per-FID struct will later allow us to configure L3 interfaces on top
of the VLAN-aware bridge.
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h index c973ab5..d6cf6de 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h @@ -165,7 +165,7 @@ struct mlxsw_sp { struct list_head list; DECLARE_BITMAP(mapped, MLXSW_SP_MID_MAX); } br_mids; - DECLARE_BITMAP(active_fids, VLAN_N_VID); + struct list_head fids; /* VLAN-aware bridge FIDs */ struct mlxsw_sp_port **ports; struct mlxsw_core *core; const struct mlxsw_bus_info *bus_info; |