Skip to content

mlxsw: Reduce dependency between bridge and router code

Ido Schimmel netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10mlxsw: spectrum_fid: Use 'refcount_t' for FID reference countingdrivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c+7 -60 replies
2/10mlxsw: spectrum_switchdev: Propagate extack to bridge creation functiondrivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c+12 -70 replies
3/10mlxsw: spectrum_switchdev: Have VXLAN device take reference on FIDdrivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c+74 -190 replies
4/10mlxsw: spectrum_switchdev: Remove VXLAN checks during FID membershipdrivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c+2 -580 replies
5/10mlxsw: spectrum: Reduce dependency between bridge and router codedrivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c+2 -200 replies
6/10selftests: mlxsw: Remove deprecated testtools/testing/selftests/drivers/net/mlxsw/extack.sh tools/testing/selftests/drivers/net/mlxsw/vxlan.sh+0 -450 replies
7/10selftests: mlxsw: extack: Test bridge creation with VXLANtools/testing/selftests/drivers/net/mlxsw/extack.sh+32 -00 replies
8/10selftests: mlxsw: extack: Test creation of multiple VLAN-aware bridgestools/testing/selftests/drivers/net/mlxsw/extack.sh+23 -00 replies
9/10selftests: mlxsw: vxlan: Adjust test to recent changestools/testing/selftests/drivers/net/mlxsw/vxlan.sh+1 -30 replies
10/10selftests: mlxsw: vxlan: Add test for error pathtools/testing/selftests/drivers/net/mlxsw/vxlan.sh+20 -00 replies

Reviews trailers per patch

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

PatchJiri PirkoPetr Machata
1/10A-b
2/10A-b
3/10A-b R-b
4/10A-b
5/10A-b
6/10A-b
7/10A-b
8/10A-b
9/10A-b
10/10A-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 00/10] mlxsw: Reduce dependency between bridge and router code

From: Ido Schimmel <[email protected]>

This patch set reduces the dependency between the bridge and the router code in preparation for RTNL removal from the route insertion path in mlxsw.

The motivation and solution are explained in detail in patch #3. The main idea is that we need to stop special-casing the VXLAN devices with regards to the reference counting of the FIDs. Otherwise, we can bump into the situation described in patch #3, where the routing code calls into the bridge code which calls back into the routing code. After adding a mutex to protect router data structures to remove RTNL dependency, this can result in an AA deadlock.

Patches #1 and #2 are preparations. They convert the FIDs to use 'refcount_t' for reference counting in order to catch over/under flows and add extack to the bridge creation function.

Patches #3-#5 reduce the dependency between the bridge and the router code. First, by having the VXLAN device take a reference on the FID in patch #3 and then by removing unnecessary code following the change in patch #3.

Patches #6-#10 adjust existing selftests and add new ones to exercise the new code paths.

Ido Schimmel (10):
mlxsw: spectrum_fid: Use 'refcount_t' for FID reference counting
mlxsw: spectrum_switchdev: Propagate extack to bridge creation
function
mlxsw: spectrum_switchdev: Have VXLAN device take reference on FID
mlxsw: spectrum_switchdev: Remove VXLAN checks during FID membership
mlxsw: spectrum: Reduce dependency between bridge and router code
selftests: mlxsw: Remove deprecated test
selftests: mlxsw: extack: Test bridge creation with VXLAN
selftests: mlxsw: extack: Test creation of multiple VLAN-aware bridges
selftests: mlxsw: vxlan: Adjust test to recent changes
selftests: mlxsw: vxlan: Add test for error path

 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   4 -
 .../ethernet/mellanox/mlxsw/spectrum_fid.c    |  13 +-
 .../ethernet/mellanox/mlxsw/spectrum_router.c |   4 +-
 .../mellanox/mlxsw/spectrum_switchdev.c       | 186 +++++++++---------
 .../selftests/drivers/net/mlxsw/extack.sh     |  45 ++++-
 .../selftests/drivers/net/mlxsw/vxlan.sh      |  27 +--
 6 files changed, 147 insertions(+), 132 deletions(-)
Signature · 1 line
2.24.1