public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] mlxsw: Add support for 802.1ad bridging
@ 2020-11-29 12:53 Ido Schimmel
  2020-11-29 12:53 ` [PATCH net-next 1/9] mlxsw: reg: Add Switch Port VLAN Classification Register Ido Schimmel
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Ido Schimmel @ 2020-11-29 12:53 UTC (permalink / raw)
  To: netdev, bridge
  Cc: davem, kuba, jiri, ivecera, roopa, nikolay, amcohen, danieller,
	petrm, mlxsw, Ido Schimmel

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

-- 
2.28.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-12-01 23:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-29 12:53 [PATCH net-next 0/9] mlxsw: Add support for 802.1ad bridging Ido Schimmel
2020-11-29 12:53 ` [PATCH net-next 1/9] mlxsw: reg: Add Switch Port VLAN Classification Register Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 2/9] mlxsw: reg: Add et_vlan field to SPVID register Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 3/9] mlxsw: spectrum: Only treat 802.1q packets as tagged packets Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 4/9] mlxsw: Make EtherType configurable when pushing VLAN at ingress Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 5/9] mlxsw: spectrum_switchdev: Create common functions for VLAN-aware bridge Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 6/9] mlxsw: spectrum_switchdev: Add support of QinQ traffic Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 7/9] bridge: switchdev: Notify about VLAN protocol changes Ido Schimmel
2020-11-30 15:43   ` Ivan Vecera
2020-11-29 12:54 ` [PATCH net-next 8/9] mlxsw: Add QinQ configuration vetoes Ido Schimmel
2020-11-29 12:54 ` [PATCH net-next 9/9] selftests: forwarding: Add QinQ veto testing Ido Schimmel
2020-12-01 23:40 ` [PATCH net-next 0/9] mlxsw: Add support for 802.1ad bridging patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox