Skip to content

mlxsw: Add support for resilient nexthop groups

Ido Schimmel netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (refs/heads/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_router: Add support for resilient nexthop groupsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+25 -10 repliesApplied
2/10mlxsw: spectrum_router: Add ability to overwrite adjacency entry only when inactivedrivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h +2 more+32 -190 repliesApplied
3/10mlxsw: spectrum_router: Pass payload pointer to nexthop update functiondrivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h +2 more+21 -170 repliesApplied
4/10mlxsw: spectrum_router: Add nexthop bucket replacement supportdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+134 -00 repliesApplied
5/10mlxsw: spectrum_router: Update hardware flags on nexthop bucketsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+37 -00 repliesApplied
6/10mlxsw: reg: Add Router Adjacency Table Activity Dump Registerdrivers/net/ethernet/mellanox/mlxsw/reg.h+55 -00 repliesApplied
7/10mlxsw: spectrum_router: Periodically update activity of nexthop bucketsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h+102 -00 repliesApplied
8/10mlxsw: spectrum_router: Enable resilient nexthop groups to be programmeddrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+85 -10 repliesApplied
9/10selftests: mlxsw: Test unresolved neigh trap with resilient nexthop groupstools/testing/selftests/drivers/net/mlxsw/devlink_trap_l3_exceptions.sh+31 -00 repliesApplied
10/10selftests: mlxsw: Add resilient nexthop groups configuration teststools/testing/selftests/drivers/net/mlxsw/rtnetlink.sh tools/testing/selftests/net/forwarding/lib.sh+87 -00 repliesApplied

Reviews trailers per patch

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

PatchPetr Machata
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-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: Add support for resilient nexthop groups

From: Ido Schimmel <[email protected]>

This patchset adds support for resilient nexthop groups in mlxsw. As far as the hardware is concerned, resilient groups are the same as regular groups. The differences lie in how mlxsw manages the individual adjacency entries (nexthop buckets) that make up the group.

The first difference is that unlike regular groups the driver needs to periodically update the kernel about activity of nexthop buckets so that the kernel will not treat the buckets as idle, given traffic is offloaded from the CPU to the ASIC. This is similar to what mlxsw is already doing with respect to neighbour entries. The update interval is set to 1 second to allow for short idle timers.

The second difference is that nexthop buckets that correspond to an unresolved neighbour must be programmed to the device, as the size of the group must remain fixed. This is achieved by programming such entries with trap action, in order to trigger neighbour resolution by the kernel.

The third difference is atomic replacement of individual nexthop buckets. While the driver periodically updates the kernel about activity of nexthop buckets, it is possible for a bucket to become active just before the kernel decides to replace it with a different nexthop. To avoid such situations and connections being reset, the driver instructs the device to only replace an adjacency entry if it is inactive. Failures are propagated back to the nexthop code.

Patchset overview:

Patches #1-#7 gradually add support for resilient nexthop groups

Patch #8 finally enables such groups to be programmed to the device

Patches #9-#10 add mlxsw-specific selftests

Ido Schimmel (10):
mlxsw: spectrum_router: Add support for resilient nexthop groups
mlxsw: spectrum_router: Add ability to overwrite adjacency entry only
when inactive
mlxsw: spectrum_router: Pass payload pointer to nexthop update
function
mlxsw: spectrum_router: Add nexthop bucket replacement support
mlxsw: spectrum_router: Update hardware flags on nexthop buckets
mlxsw: reg: Add Router Adjacency Table Activity Dump Register
mlxsw: spectrum_router: Periodically update activity of nexthop
buckets
mlxsw: spectrum_router: Enable resilient nexthop groups to be
programmed
selftests: mlxsw: Test unresolved neigh trap with resilient nexthop
groups
selftests: mlxsw: Add resilient nexthop groups configuration tests

 drivers/net/ethernet/mellanox/mlxsw/reg.h     |  55 +++
 .../ethernet/mellanox/mlxsw/spectrum_dpipe.c  |   4 +-
 .../ethernet/mellanox/mlxsw/spectrum_ipip.c   |  10 +-
 .../ethernet/mellanox/mlxsw/spectrum_ipip.h   |   3 +-
 .../ethernet/mellanox/mlxsw/spectrum_router.c | 422 +++++++++++++++++-
 .../ethernet/mellanox/mlxsw/spectrum_router.h |   5 +-
 .../net/mlxsw/devlink_trap_l3_exceptions.sh   |  31 ++
 .../selftests/drivers/net/mlxsw/rtnetlink.sh  |  82 ++++
 tools/testing/selftests/net/forwarding/lib.sh |   5 +
 9 files changed, 594 insertions(+), 23 deletions(-)
Signature · 1 line
2.30.2