mlxsw: Add QinQ configuration vetoes
authorDanielle Ratson <danieller@nvidia.com>
Sun, 29 Nov 2020 12:54:06 +0000 (14:54 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Dec 2020 23:21:13 +0000 (15:21 -0800)
commit09139f67d34667ef92b7d76cddc7b37f2841bd3d
treee6534bf3c6a581857a8578bd8d18cd128b819785
parent22ec19f3aee327806c37c9fa1188741574bc6445
mlxsw: Add QinQ configuration vetoes

After adding support for QinQ, a.k.a 802.1ad protocol, there are a few
scenarios that should be vetoed.

The vetoes are motivated by various ASIC limitations.
For example, a port that is member in a 802.1ad bridge cannot have 802.1q
uppers as the port needs to be configured to treat 802.1q packets as
untagged packets.

Veto all those unsupported scenarios and return suitable messages.

Signed-off-by: Danielle Ratson <danieller@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_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c