mbox series

[net-next,0/9] mlxsw: Add support for 802.1ad bridging

Message ID 20201129125407.1391557-1-idosch@idosch.org (mailing list archive)
Headers show
Series mlxsw: Add support for 802.1ad bridging | expand

Message

Ido Schimmel Nov. 29, 2020, 12:53 p.m. UTC
From: Ido Schimmel <idosch@nvidia.com>

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.

Currently, mlxsw supports bridging with VLAN-unaware (802.1d) bridges
and with VLAN-aware bridges whose VLAN protocol is 802.1q. This set adds
support for VLAN-aware bridges whose VLAN protocol is 802.1ad.

From mlxsw perspective, 802.1ad support entails two main changes:

1. Ports member in an 802.1ad bridge need to be configured to classify
802.1ad packets as tagged and all other packets as untagged

2. When pushing a VLAN at ingress (PVID), its EtherType needs to be
0x88a8 instead of 802.1q's 0x8100

The rest stays the same as with 802.1q bridges.

A follow-up patch set will add support for QinQ with VXLAN, also known
as QinVNI. Currently, linking of a VXLAN netdev to an 802.1ad bridge is
vetoed and an error is returned to user space.

Patch set overview:

Patches #1-#2 add the registers required to configure the two changes
described above.

Patch #3 changes the device to only treat 802.1q packets as tagged by
default, as opposed to both 802.1q and 802.1ad packets. This is more
inline with the behavior supported by the driver.

Patch #4 adds the ability to configure the EtherType when pushing a PVID
at ingress.

Patch #5 performs small refactoring to allow for code re-use in the next
patch.

Patch #6 adds support for 802.1ad bridging and allows mlxsw ports and
their uppers to join such a bridge.

Patch #7 changes the bridge driver to notify about changes to its VLAN
protocol, so that these could be vetoed by mlxsw in the next patch.

Patches #8-#9 teach mlxsw to veto unsupported 802.1ad configurations and
add a corresponding selftest to make sure such configurations are indeed
vetoed.

Amit Cohen (6):
  mlxsw: reg: Add Switch Port VLAN Classification Register
  mlxsw: reg: Add et_vlan field to SPVID register
  mlxsw: spectrum: Only treat 802.1q packets as tagged packets
  mlxsw: Make EtherType configurable when pushing VLAN at ingress
  mlxsw: spectrum_switchdev: Create common functions for VLAN-aware
    bridge
  mlxsw: spectrum_switchdev: Add support of QinQ traffic

Danielle Ratson (3):
  bridge: switchdev: Notify about VLAN protocol changes
  mlxsw: Add QinQ configuration vetoes
  selftests: forwarding: Add QinQ veto testing

 drivers/net/ethernet/mellanox/mlxsw/reg.h     | 114 ++++++-
 .../net/ethernet/mellanox/mlxsw/spectrum.c    | 111 ++++++-
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   7 +-
 .../ethernet/mellanox/mlxsw/spectrum_router.c |   9 +
 .../mellanox/mlxsw/spectrum_switchdev.c       | 123 +++++++-
 include/net/switchdev.h                       |   2 +
 net/bridge/br_vlan.c                          |  16 +-
 .../drivers/net/mlxsw/q_in_q_veto.sh          | 296 ++++++++++++++++++
 8 files changed, 657 insertions(+), 21 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/q_in_q_veto.sh

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 1, 2020, 11:40 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Sun, 29 Nov 2020 14:53:58 +0200 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
> 
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next,1/9] mlxsw: reg: Add Switch Port VLAN Classification Register
    https://git.kernel.org/netdev/net-next/c/7e9a6620d5c3
  - [net-next,2/9] mlxsw: reg: Add et_vlan field to SPVID register
    https://git.kernel.org/netdev/net-next/c/2a5a290d6d94
  - [net-next,3/9] mlxsw: spectrum: Only treat 802.1q packets as tagged packets
    https://git.kernel.org/netdev/net-next/c/a2ef3ae15834
  - [net-next,4/9] mlxsw: Make EtherType configurable when pushing VLAN at ingress
    https://git.kernel.org/netdev/net-next/c/3ae7a65b6424
  - [net-next,5/9] mlxsw: spectrum_switchdev: Create common functions for VLAN-aware bridge
    https://git.kernel.org/netdev/net-next/c/773ce33a4860
  - [net-next,6/9] mlxsw: spectrum_switchdev: Add support of QinQ traffic
    https://git.kernel.org/netdev/net-next/c/80dfeafd6479
  - [net-next,7/9] bridge: switchdev: Notify about VLAN protocol changes
    https://git.kernel.org/netdev/net-next/c/22ec19f3aee3
  - [net-next,8/9] mlxsw: Add QinQ configuration vetoes
    https://git.kernel.org/netdev/net-next/c/09139f67d346
  - [net-next,9/9] selftests: forwarding: Add QinQ veto testing
    https://git.kernel.org/netdev/net-next/c/008cb2ec4354

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html