mlxsw: A dedicated notifier block for router code
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
Patches in v1 All 10 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | mlxsw: spectrum: Tolerate enslaving of various devices to VRFdrivers/ | +16 | 0 replies | Applied |
| 2/10 | mlxsw: spectrum_router: Add a dedicated notifier blockdrivers/ drivers/ | +21 | 0 replies | Applied |
| 3/10 | mlxsw: spectrum: Move handling of VRF events to router codedrivers/ drivers/ drivers/ | +16 | 0 replies | Applied |
| 4/10 | mlxsw: spectrum: Move handling of HW stats events to router codedrivers/ drivers/ | +40 | 0 replies | Applied |
| 5/10 | mlxsw: spectrum: Move handling of router events to router codedrivers/ drivers/ drivers/ | +16 | 0 replies | Applied |
| 6/10 | mlxsw: spectrum: Move handling of tunnel events to router codedrivers/ drivers/ drivers/ | +15 | 0 replies | Applied |
| 7/10 | mlxsw: spectrum: Update a commentdrivers/ | +2 | 0 replies | Applied |
| 8/10 | mlxsw: spectrum_router: Take router lock in router notifier handlerdrivers/ | +15 | 0 replies | Applied |
| 9/10 | selftests: lib: Add a generic helper for obtaining HW statstools/ tools/ | +15 | 0 replies | Applied |
| 10/10 | selftests: forwarding: Add a tunnel-based test for L3 HW statstools/ tools/ | +110 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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