mlxsw: spectrum_switchdev: Allow port enslavement to a VLAN-unaware bridge
authorIdo Schimmel <[email protected]>
Tue, 20 Feb 2018 07:45:12 +0000 (08:45 +0100)
committerDavid S. Miller <[email protected]>
Mon, 26 Feb 2018 16:12:26 +0000 (11:12 -0500)
commit65b53bfd497b052277f89afb3839ace38190974c
treef943275a51cdb90153ffd22aa8f73369eb9bf40a
parentba6056a41cb09575a5ffe2fcfa9a0afb1b60eb92
mlxsw: spectrum_switchdev: Allow port enslavement to a VLAN-unaware bridge

Up until now we only allowed VLAN devices to be put in a VLAN-unaware
bridge, but some users need the ability to enslave physical ports as
well.

This is achieved by mapping the port and VID 1 to the bridge's vFID,
instead of the port and the VID used by the VLAN device.

The above is valid because as long as the port is not enslaved to a
bridge, VID 1 is guaranteed to be configured as PVID and egress
untagged.

Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
Tested-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c