Skip to content

mlxsw: Support for nexthop group statistics

Petr Machata netdev 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 9 repliesApplied 11/11

Patches in v1 All 11 applied

#Subject and filesSizeRepliesApplied
1/11net: nexthop: Initialize NH group ID in resilient NH group notifiersnet/ipv4/nexthop.c+1 -00 repliesApplied
2/11net: nexthop: Have all NH notifiers carry NH IDinclude/net/nexthop.h net/ipv4/nexthop.c+2 -20 repliesApplied
3/11mlxsw: spectrum_router: Rename two functionsdrivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h+19 -190 repliesApplied
4/11mlxsw: spectrum_router: Have mlxsw_sp_nexthop_counter_enable() return intdrivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h+36 -120 repliesApplied
5/11mlxsw: spectrum: Allow fetch-and-clear of flow countersdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c +2 more+11 -90 repliesApplied
6/11mlxsw: spectrum_router: Avoid allocating NH counters twicedrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+3 -00 repliesApplied
7/11mlxsw: spectrum_router: Add helpers for nexthop countersdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+50 -150 repliesApplied
8/11mlxsw: spectrum_router: Track NH ID's of group membersdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+2 -00 repliesApplied
9/11mlxsw: spectrum_router: Support nexthop group hardware statisticsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+142 -60 repliesApplied
10/11mlxsw: spectrum_router: Share nexthop counters in resilient groupsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+68 -20 repliesApplied
11/11selftests: forwarding: Add a test for NH group statstools/testing/selftests/net/forwarding/Makefile tools/testing/selftests/net/forwarding/lib.sh tools/testing/selftests/net/forwarding/router_mpath_nh.sh +2 more+190 -09 repliesApplied

Reviews trailers per patch

9 of 11 patches have a Reviewed-by or Acked-by.

PatchIdo Schimmel
1/11R-b
2/11R-b
3/11R-b
4/11R-b
5/11R-b
6/11R-b
7/11R-b
8/11R-b
9/11
10/11R-b
11/11

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/11] mlxsw: Support for nexthop group statistics

ECMP is a fundamental component in L3 designs. However, it's fragile. Many factors influence whether an ECMP group will operate as intended: hash policy (i.e. the set of fields that contribute to ECMP hash calculation), neighbor validity, hash seed (which might lead to polarization) or the type of ECMP group used (hash-threshold or resilient).

At the same time, collection of statistics that would help an operator determine that the group performs as desired, is difficult.

Support for nexthop group statistics and their HW collection has been introduced recently. In this patch set, add HW stats collection support to mlxsw.

This patchset progresses as follows:

- Patches #1 and #2 add nexthop IDs to notifiers.
- Patches #3 and #4 are code-shaping.
- Patches #5, #6 and #7 adjust the flow counter code.
- Patches #8 and #9 add HW nexthop counters.
- Patch #10 adjusts the HW counter code to allow sharing the same counter for several resilient group buckets with the same NH ID.
- Patch #11 adds a selftest.

Petr Machata (11):
net: nexthop: Initialize NH group ID in resilient NH group notifiers
net: nexthop: Have all NH notifiers carry NH ID
mlxsw: spectrum_router: Rename two functions
mlxsw: spectrum_router: Have mlxsw_sp_nexthop_counter_enable() return
int
mlxsw: spectrum: Allow fetch-and-clear of flow counters
mlxsw: spectrum_router: Avoid allocating NH counters twice
mlxsw: spectrum_router: Add helpers for nexthop counters
mlxsw: spectrum_router: Track NH ID's of group members
mlxsw: spectrum_router: Support nexthop group hardware statistics
mlxsw: spectrum_router: Share nexthop counters in resilient groups
selftests: forwarding: Add a test for NH group stats

 .../net/ethernet/mellanox/mlxsw/spectrum.c    |   8 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   4 +-
 .../ethernet/mellanox/mlxsw/spectrum_acl.c    |   2 +-
 .../ethernet/mellanox/mlxsw/spectrum_dpipe.c  |  22 +-
 .../mellanox/mlxsw/spectrum_mr_tcam.c         |   2 +-
 .../ethernet/mellanox/mlxsw/spectrum_router.c | 312 ++++++++++++++++--
 .../ethernet/mellanox/mlxsw/spectrum_router.h |   6 +-
 include/net/nexthop.h                         |   2 +-
 net/ipv4/nexthop.c                            |   3 +-
 .../testing/selftests/net/forwarding/Makefile |   1 +
 tools/testing/selftests/net/forwarding/lib.sh |  34 ++
 .../net/forwarding/router_mpath_nh.sh         |  13 +
 .../net/forwarding/router_mpath_nh_lib.sh     | 129 ++++++++
 .../net/forwarding/router_mpath_nh_res.sh     |  13 +
 14 files changed, 505 insertions(+), 46 deletions(-)
 create mode 100644 tools/testing/selftests/net/forwarding/router_mpath_nh_lib.sh
Signature · 1 line
2.43.0