public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: netdev@vger.kernel.org, bridge@lists.linux-foundation.org
Cc: davem@davemloft.net, kuba@kernel.org, jiri@nvidia.com,
	ivecera@redhat.com, roopa@nvidia.com, nikolay@nvidia.com,
	amcohen@nvidia.com, danieller@nvidia.com, petrm@nvidia.com,
	mlxsw@nvidia.com, Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next 0/9] mlxsw: Add support for 802.1ad bridging
Date: Sun, 29 Nov 2020 14:53:58 +0200	[thread overview]
Message-ID: <20201129125407.1391557-1-idosch@idosch.org> (raw)

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


             reply	other threads:[~2020-11-29 12:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-29 12:53 Ido Schimmel [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201129125407.1391557-1-idosch@idosch.org \
    --to=idosch@idosch.org \
    --cc=amcohen@nvidia.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=idosch@nvidia.com \
    --cc=ivecera@redhat.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=petrm@nvidia.com \
    --cc=roopa@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox