mlxsw: spectrum_switchdev: Add support of QinQ traffic
authorAmit Cohen <amcohen@nvidia.com>
Sun, 29 Nov 2020 12:54:04 +0000 (14:54 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Dec 2020 23:21:12 +0000 (15:21 -0800)
commit80dfeafd64792a634054bfde63018aa564d82f0f
tree124bdf62e24bb340b8425f4834cc98f9c7174a3f
parent773ce33a48602126499bd603b9c804f15bf8c730
mlxsw: spectrum_switchdev: Add support of QinQ traffic

802.1ad, also known as QinQ is an extension to the 802.1q standard, which
is concerned with passing possibly 802.1q-tagged packets through another
VLAN-like tunnel. The format of 802.1ad tag is the same as 802.1q, except
it uses the EtherType of 0x88a8, unlike 802.1q's 0x8100.

Add support for 802.1ad protocol. Most of the configuration is the same
as 802.1q. The difference is that before a port joins an 802.1ad bridge it
needs to be configured to recognize 802.1ad packets as tagged and other
packets (e.g., 802.1q) as untagged.

VXLAN is not currently supported with 802.1ad bridge, so return an error
with an appropriate extack message.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c