Skip to content

net: Resilient NH groups: netdevsim, selftests

Petr Machata netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10netdevsim: fib: Introduce a lock to guard nexthop hashtabledrivers/net/netdevsim/fib.c+7 -30 replies
2/10netdevsim: Create a helper for setting nexthop hardware flagsdrivers/net/netdevsim/fib.c+10 -30 replies
3/10netdevsim: Add support for resilient nexthop groupsdrivers/net/netdevsim/fib.c+55 -00 replies
4/10netdevsim: Allow reporting activity on nexthop bucketsdrivers/net/netdevsim/fib.c+61 -00 replies
5/10selftests: fib_nexthops: Declutter test outputtools/testing/selftests/net/fib_nexthops.sh+2 -01 reply
6/10selftests: fib_nexthops: List each test case in a different linetools/testing/selftests/net/fib_nexthops.sh+26 -41 reply
7/10selftests: fib_nexthops: Test resilient nexthop groupstools/testing/selftests/net/fib_nexthops.sh+517 -01 reply
8/10selftests: forwarding: Add resilient hashing testtools/testing/selftests/net/forwarding/router_mpath_nh_res.sh+400 -00 replies
9/10selftests: forwarding: Add resilient multipath tunneling nexthop testtools/testing/selftests/net/forwarding/gre_multipath_nh_res.sh+361 -00 replies
10/10selftests: netdevsim: Add test for resilient nexthop groups offload APItools/testing/selftests/drivers/net/netdevsim/nexthop.sh+620 -00 replies

Reviews trailers per patch

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

PatchPetr MachataIdo SchimmelDavid Ahern
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b R-b
6/10R-b R-b
7/10R-b
8/10R-b
9/10R-b
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH net-next 00/10] net: Resilient NH groups: netdevsim, selftests

Support for resilient next-hop groups was added in a previous patch set. Resilient next hop groups add a layer of indirection between the SKB hash and the next hop. Thus the hash is used to reference a hash table bucket, which is then used to reference a particular next hop. This allows the system more flexibility when assigning SKB hash space to next hops. Previously, each next hop had to be assigned a continuous range of SKB hash space. With a hash table as an intermediate layer, it is possible to reassign next hops with a hash table bucket granularity. In turn, this mends issues with traffic flow redirection resulting from next hop removal or adjustments in next-hop weights.

This patch set introduces mock offloading of resilient next hop groups by the netdevsim driver, and a suite of selftests.

- Patch #1 adds a netdevsim-specific lock to protect next-hop hashtable. Previously, netdevsim relied on RTNL to maintain mutual exclusion. Patch #2 extracts a helper to make the following patches clearer.

- Patch #3 implements the support for offloading of resilient next-hop groups.

- Patch #4 introduces a new debugfs interface to set activity on a selected next-hop bucket. This simulates how HW can periodically report bucket activity, and buckets thus marked are expected to be exempt from migration to new next hops when the group changes.

- Patches #5 and #6 clean up the fib_nexthop selftests.

- Patches #7, #8 and #9 add tests for resilient next hop groups. Patch #7 adds resilient-hashing counterparts to fib_nexthops.sh. Patch #8 adds a new traffic test for resilient next-hop groups. Patch #9 adds a new traffic test for tunneling.

- Patch #10 actually leverages the netdevsim offload to implement a suite of algorithmic tests that verify how and when buckets are migrated under various simulated workload scenarios.

The overall plan is to contribute approximately the following patchsets:

1) Nexthop policy refactoring (already pushed)
2) Preparations for resilient next hop groups (already pushed)
3) Implementation of resilient next hop group (already pushed)
4) Netdevsim offload plus a suite of selftests (this patchset)
5) Preparations for mlxsw offload of resilient next-hop groups
6) mlxsw offload including selftests

Interested parties can look at the complete code at [2].

[1] https://tools.ietf.org/html/rfc2992
[2] https://github.com/idosch/linux/commits/submit/res_integ_v1

Ido Schimmel (9):
netdevsim: Create a helper for setting nexthop hardware flags
netdevsim: Add support for resilient nexthop groups
netdevsim: Allow reporting activity on nexthop buckets
selftests: fib_nexthops: Declutter test output
selftests: fib_nexthops: List each test case in a different line
selftests: fib_nexthops: Test resilient nexthop groups
selftests: forwarding: Add resilient hashing test
selftests: forwarding: Add resilient multipath tunneling nexthop test
selftests: netdevsim: Add test for resilient nexthop groups offload
API

Petr Machata (1):
netdevsim: fib: Introduce a lock to guard nexthop hashtable

 drivers/net/netdevsim/fib.c                   | 139 +++-
 .../drivers/net/netdevsim/nexthop.sh          | 620 ++++++++++++++++++
 tools/testing/selftests/net/fib_nexthops.sh   | 549 +++++++++++++++-
 .../net/forwarding/gre_multipath_nh_res.sh    | 361 ++++++++++
 .../net/forwarding/router_mpath_nh_res.sh     | 400 +++++++++++
 5 files changed, 2059 insertions(+), 10 deletions(-)
 create mode 100755 tools/testing/selftests/net/forwarding/gre_multipath_nh_res.sh
 create mode 100755 tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh
Signature · 1 line
2.26.2