]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Allocate active VLANs only for port netdevs
authorIdo Schimmel <idosch@mellanox.com>
Tue, 15 Dec 2015 15:03:36 +0000 (16:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Dec 2015 16:58:21 +0000 (11:58 -0500)
commit5f565dc178301b43bde053bd6287084112b3aaef
tree8878f3e56aa8207ab6b2978fe16f324356d0cea3
parent7c99e22de314170fdd11068618cb96efa532c604
mlxsw: spectrum: Allocate active VLANs only for port netdevs

When adding support for bridges between VLAN interfaces, we'll introduce
a new entity called a vPort, which is a represntation of the VLAN
interface in the hardware.

The main difference between a vPort and a physical port is that several
FIDs can be bound to the latter, whereas only one (called a vFID) can be
bound to the first.

Therefore, it makes sense to use the same struct to represent the two,
but to only allocate the 'active_vlans' bitmap in case of a physical
port.

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