mbox series

[net-next,0/7] mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2

Message ID 20210317103529.2903172-1-idosch@idosch.org (mailing list archive)
Headers show
Series mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2 | expand

Message

Ido Schimmel March 17, 2021, 10:35 a.m. UTC
From: Ido Schimmel <idosch@nvidia.com>

This patchset allows user space to simultaneously configure both 802.1d
and 802.1ad VxLAN bridges on Spectrum-2 and later ASICs. 802.1ad VxLAN
bridges are still forbidden on Spectrum-1.

The reason for the current limitation is that up until now the EtherType
that was pushed to decapsulated VxLAN packets was a property of the
tunnel port, of which there is only one. This meant that a 802.1ad VxLAN
bridge could not be configured if the tunnel port was already configured
to push a 802.1q tag.

This patchset improves the situation by making two changes. First,
decapsulated packets are marked as having their EtherType decided by the
egress port. Second, local ports member in the bridge (e.g., swp1) are
configured to set the correct egress EtherType.

Patchset overview:

Patch #1 adds a register required for the first change

Patches #2-#3 add the register required for the second change and a
corresponding API

Patch #4 prepares the driver for the split in behavior between
Spectrum-1 and later ASICs

Patch #5 performs the two above mentioned changes to allow the driver to
support simultaneous 802.1ad and 802.1d VxLAN bridges on Spectrum-2 and
later ASICs

Patch #6 adds a selftest

Patch #7 removes a selftest that verified the limitation that was lifted
by this patchset

Amit Cohen (7):
  mlxsw: reg: Add egr_et_set field to SPVID
  mlxsw: reg: Add Switch Port Egress VLAN EtherType Register
  mlxsw: spectrum: Add mlxsw_sp_port_egress_ethtype_set()
  mlxsw: Add struct mlxsw_sp_switchdev_ops per ASIC
  mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2
  selftests: forwarding: Add test for dual VxLAN bridge
  selftests: mlxsw: spectrum-2: Remove q_in_vni_veto test

 drivers/net/ethernet/mellanox/mlxsw/reg.h     |  45 +++
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  19 +
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   8 +
 .../ethernet/mellanox/mlxsw/spectrum_nve.h    |   1 -
 .../mellanox/mlxsw/spectrum_nve_vxlan.c       |  15 +-
 .../mellanox/mlxsw/spectrum_switchdev.c       |  74 +++-
 .../net/mlxsw/spectrum-2/q_in_vni_veto.sh     |  77 ----
 .../net/forwarding/dual_vxlan_bridge.sh       | 366 ++++++++++++++++++
 8 files changed, 513 insertions(+), 92 deletions(-)
 delete mode 100755 tools/testing/selftests/drivers/net/mlxsw/spectrum-2/q_in_vni_veto.sh
 create mode 100755 tools/testing/selftests/net/forwarding/dual_vxlan_bridge.sh

Comments

patchwork-bot+netdevbpf@kernel.org March 17, 2021, 7:30 p.m. UTC | #1
Hello:

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

On Wed, 17 Mar 2021 12:35:22 +0200 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
> 
> This patchset allows user space to simultaneously configure both 802.1d
> and 802.1ad VxLAN bridges on Spectrum-2 and later ASICs. 802.1ad VxLAN
> bridges are still forbidden on Spectrum-1.
> 
> The reason for the current limitation is that up until now the EtherType
> that was pushed to decapsulated VxLAN packets was a property of the
> tunnel port, of which there is only one. This meant that a 802.1ad VxLAN
> bridge could not be configured if the tunnel port was already configured
> to push a 802.1q tag.
> 
> [...]

Here is the summary with links:
  - [net-next,1/7] mlxsw: reg: Add egr_et_set field to SPVID
    https://git.kernel.org/netdev/net-next/c/1b35293b7afc
  - [net-next,2/7] mlxsw: reg: Add Switch Port Egress VLAN EtherType Register
    https://git.kernel.org/netdev/net-next/c/d8f4da73cea7
  - [net-next,3/7] mlxsw: spectrum: Add mlxsw_sp_port_egress_ethtype_set()
    https://git.kernel.org/netdev/net-next/c/114a465d890a
  - [net-next,4/7] mlxsw: Add struct mlxsw_sp_switchdev_ops per ASIC
    https://git.kernel.org/netdev/net-next/c/0f74fa561730
  - [net-next,5/7] mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2
    https://git.kernel.org/netdev/net-next/c/bf677bd25a99
  - [net-next,6/7] selftests: forwarding: Add test for dual VxLAN bridge
    https://git.kernel.org/netdev/net-next/c/35f15ab378fa
  - [net-next,7/7] selftests: mlxsw: spectrum-2: Remove q_in_vni_veto test
    https://git.kernel.org/netdev/net-next/c/1724c97d2f9d

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