mbox series

[net-next,00/10] mlxsw: Add support for resilient nexthop groups

Message ID 20210324201424.157387-1-idosch@idosch.org
Headers show
Series mlxsw: Add support for resilient nexthop groups | expand

Message

Ido Schimmel March 24, 2021, 8:14 p.m. UTC
From: Ido Schimmel <idosch@nvidia.com>

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(-)

Comments

patchwork-bot+netdevbpf@kernel.org March 24, 2021, 11:50 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Wed, 24 Mar 2021 22:14:14 +0200 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
> 
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next,01/10] mlxsw: spectrum_router: Add support for resilient nexthop groups
    https://git.kernel.org/netdev/net-next/c/c6fc65f48072
  - [net-next,02/10] mlxsw: spectrum_router: Add ability to overwrite adjacency entry only when inactive
    https://git.kernel.org/netdev/net-next/c/62b67ff33bee
  - [net-next,03/10] mlxsw: spectrum_router: Pass payload pointer to nexthop update function
    https://git.kernel.org/netdev/net-next/c/197fdfd107e3
  - [net-next,04/10] mlxsw: spectrum_router: Add nexthop bucket replacement support
    https://git.kernel.org/netdev/net-next/c/617a77f044ed
  - [net-next,05/10] mlxsw: spectrum_router: Update hardware flags on nexthop buckets
    https://git.kernel.org/netdev/net-next/c/d7761cb30374
  - [net-next,06/10] mlxsw: reg: Add Router Adjacency Table Activity Dump Register
    https://git.kernel.org/netdev/net-next/c/75d495b02982
  - [net-next,07/10] mlxsw: spectrum_router: Periodically update activity of nexthop buckets
    https://git.kernel.org/netdev/net-next/c/debd2b3bf573
  - [net-next,08/10] mlxsw: spectrum_router: Enable resilient nexthop groups to be programmed
    https://git.kernel.org/netdev/net-next/c/03490a823915
  - [net-next,09/10] selftests: mlxsw: Test unresolved neigh trap with resilient nexthop groups
    https://git.kernel.org/netdev/net-next/c/861584724c44
  - [net-next,10/10] selftests: mlxsw: Add resilient nexthop groups configuration tests
    https://git.kernel.org/netdev/net-next/c/ffd3e9b07b9e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html