Skip to content

mlxsw: Add VxLAN support with VLAN-aware bridges

Ido Schimmel bridge netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8net: bridge: Extend br_vlan_get_pvid() for bridge portsnet/bridge/br_vlan.c+5 -10 replies
2/8mlxsw: spectrum_fid: Add API to lookup 802.1Q FIDs without creating themdrivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c+11 -20 replies
3/8mlxsw: spectrum_switchdev: Unify VxLAN leave functiondrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c+9 -380 replies
4/8mlxsw: spectrum_switchdev: Prepare function for VLAN-aware bridgesdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c+11 -90 replies
5/8mlxsw: spectrum: Enable VxLAN enslavement to VLAN-aware bridgesdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c+404 -140 replies
6/8selftests: mlxsw: Consider VLAN-aware bridges as validtools/testing/selftests/drivers/net/mlxsw/vxlan.sh+1 -10 replies
7/8selftests: mlxsw: Add a test for VxLAN configuration with a VLAN-aware bridgetools/testing/selftests/drivers/net/mlxsw/vxlan.sh+203 -10 replies
8/8selftests: forwarding: Add VxLAN test with a VLAN-aware bridgetools/testing/selftests/net/forwarding/vxlan_bridge_1q.sh tools/testing/selftests/net/forwarding/vxlan_bridge_1q_port_8472.sh+800 -00 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchPetr Machata
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/8] mlxsw: Add VxLAN support with VLAN-aware bridges

Commit 53e50a6ec24d ("Merge branch 'mlxsw-Add-VxLAN-support'") added mlxsw support for VxLAN when the VxLAN device was enslaved to VLAN-unaware bridges. This patchset extends mlxsw to also support VxLAN with VLAN-aware bridges.

With VLAN-aware bridges, the VxLAN device's VNI is mapped to the VLAN that is configured as 'pvid untagged' on the corresponding bridge port. To prevent ambiguity, mlxsw forbids configurations in which the same VLAN is configured as 'pvid untagged' on multiple VxLAN devices.

Patches #1-#2 add the necessary APIs in mlxsw and the bridge driver.

Patches #3-#4 perform small refactoring in order to prepare mlxsw for VLAN-aware support.

Patch #5 finally enables the enslavement of VxLAN devices to a VLAN-aware bridge. Among other things, it extends mlxsw to handle switchdev notifications about VLAN add / delete on a VxLAN device enslaved to an offloaded VLAN-aware bridge.

Patches #6-#8 add selftests to test the new functionality.

Ido Schimmel (8):
net: bridge: Extend br_vlan_get_pvid() for bridge ports
mlxsw: spectrum_fid: Add API to lookup 802.1Q FIDs without creating
them
mlxsw: spectrum_switchdev: Unify VxLAN leave function
mlxsw: spectrum_switchdev: Prepare function for VLAN-aware bridges
mlxsw: spectrum: Enable VxLAN enslavement to VLAN-aware bridges
selftests: mlxsw: Consider VLAN-aware bridges as valid
selftests: mlxsw: Add a test for VxLAN configuration with a VLAN-aware
bridge
selftests: forwarding: Add VxLAN test with a VLAN-aware bridge

 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  53 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  26 +-
 .../ethernet/mellanox/mlxsw/spectrum_fid.c    |   6 +
 .../mellanox/mlxsw/spectrum_switchdev.c       | 407 +++++++--
 net/bridge/br_vlan.c                          |   6 +-
 .../selftests/drivers/net/mlxsw/vxlan.sh      | 206 ++++-
 .../net/forwarding/vxlan_bridge_1q.sh         | 790 ++++++++++++++++++
 .../forwarding/vxlan_bridge_1q_port_8472.sh   |  10 +
 8 files changed, 1441 insertions(+), 63 deletions(-)
 create mode 100755 tools/testing/selftests/net/forwarding/vxlan_bridge_1q.sh
 create mode 100755 tools/testing/selftests/net/forwarding/vxlan_bridge_1q_port_8472.sh
Signature · 1 line
2.19.1