Skip to content

mlxsw: A dedicated notifier block for router code

Ido Schimmel netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 0 repliesApplied 10/10

Patches in v1 All 10 applied

#Subject and filesSizeRepliesApplied
1/10mlxsw: spectrum: Tolerate enslaving of various devices to VRFdrivers/net/ethernet/mellanox/mlxsw/spectrum.c+16 -100 repliesApplied
2/10mlxsw: spectrum_router: Add a dedicated notifier blockdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h+21 -00 repliesApplied
3/10mlxsw: spectrum: Move handling of VRF events to router codedrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+16 -150 repliesApplied
4/10mlxsw: spectrum: Move handling of HW stats events to router codedrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+40 -110 repliesApplied
5/10mlxsw: spectrum: Move handling of router events to router codedrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+16 -180 repliesApplied
6/10mlxsw: spectrum: Move handling of tunnel events to router codedrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+15 -280 repliesApplied
7/10mlxsw: spectrum: Update a commentdrivers/net/ethernet/mellanox/mlxsw/spectrum.c+2 -30 repliesApplied
8/10mlxsw: spectrum_router: Take router lock in router notifier handlerdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+15 -320 repliesApplied
9/10selftests: lib: Add a generic helper for obtaining HW statstools/testing/selftests/net/forwarding/hw_stats_l3.sh tools/testing/selftests/net/forwarding/lib.sh+15 -120 repliesApplied
10/10selftests: forwarding: Add a tunnel-based test for L3 HW statstools/testing/selftests/net/forwarding/Makefile tools/testing/selftests/net/forwarding/hw_stats_l3_gre.sh+110 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 00/10] mlxsw: A dedicated notifier block for router code

Petr says:

Currently all netdevice events are handled in the centralized notifier handler maintained by spectrum.c. Since a number of events are involving router code, spectrum.c needs to dispatch them to spectrum_router.c. The spectrum module therefore needs to know more about the router code than it should have, and there is are several API points through which the two modules communicate.

In this patchset, move bulk of the router-related event handling to the router code. Some of the knowledge has to stay: spectrum.c cannot veto events that the router supports, and vice versa. But beyond that, the two can ignore each other's details, which leads to more focused and simpler code.

As a side effect, this fixes L3 HW stats support on tunnel netdevices.

The patch set progresses as follows:

- In patch #1, change spectrum code to not bounce L3 enslavement, which the router code supports.

- In patch #2, add a new do-nothing notifier block to the router code.

- In patches #3-#6, move router-specific event handling to the router module. In patch #7, clean up a comment.

- In patch #8, use the advantage that all router event handling is in the router code and clean up taking router lock.

- mlxsw supports L3 HW stats on tunnels as of this patchset. Patches #9 and #10 therefore add a selftest for L3 HW stats support on tunnels.

Petr Machata (10):
mlxsw: spectrum: Tolerate enslaving of various devices to VRF
mlxsw: spectrum_router: Add a dedicated notifier block
mlxsw: spectrum: Move handling of VRF events to router code
mlxsw: spectrum: Move handling of HW stats events to router code
mlxsw: spectrum: Move handling of router events to router code
mlxsw: spectrum: Move handling of tunnel events to router code
mlxsw: spectrum: Update a comment
mlxsw: spectrum_router: Take router lock in router notifier handler
selftests: lib: Add a generic helper for obtaining HW stats
selftests: forwarding: Add a tunnel-based test for L3 HW stats

 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  66 ++------
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  17 --
 .../ethernet/mellanox/mlxsw/spectrum_router.c | 160 +++++++++++++-----
 .../ethernet/mellanox/mlxsw/spectrum_router.h |   1 +
 .../testing/selftests/net/forwarding/Makefile |   1 +
 .../selftests/net/forwarding/hw_stats_l3.sh   |  16 +-
 .../net/forwarding/hw_stats_l3_gre.sh         | 109 ++++++++++++
 tools/testing/selftests/net/forwarding/lib.sh |  11 ++
 8 files changed, 259 insertions(+), 122 deletions(-)
 create mode 100755 tools/testing/selftests/net/forwarding/hw_stats_l3_gre.sh
Signature · 1 line
2.35.1