Skip to content

RFC nexthop: Add support for active-backup nexthop type

David Ahern netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8nexthop: Rename nexthop_free_mpathnet/ipv4/nexthop.c+2 -20 replies
2/8nexthop: Refactor nexthop_select_pathnet/ipv4/nexthop.c+28 -190 replies
3/8nexthop: Refactor nexthop_for_each_fib6_nhnet/ipv4/nexthop.c+33 -150 replies
4/8nexthop: Move nexthop_get_nhc_lookup to nexthop.cinclude/net/nexthop.h net/ipv4/nexthop.c+51 -280 replies
5/8nexthop: Move nexthop_uses_dev to nexthop.cinclude/net/nexthop.h net/ipv4/nexthop.c+36 -240 replies
6/8nexthop: Add primary_only argument to nexthop_for_each_fib6_nhinclude/net/nexthop.h net/ipv4/nexthop.c net/ipv6/ip6_fib.c +1 more+26 -230 replies
7/8nexthop: Add support for active-backup nexthop typeinclude/net/nexthop.h include/uapi/linux/nexthop.h net/ipv4/fib_semantics.c +1 more+217 -260 replies
8/8selftests: Add active-backup nexthop teststools/testing/selftests/net/fib_nexthops.sh+330 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC net-next 0/8] nexthop: Add support for active-backup nexthop type

This set adds support for a new nexthop group - active-backup. The intent is that the group describes a primary nexthop with a backup option if the primary is not available. Since nexthop code removes entries on carrier or admin down this really means the backup applies when the neighbor entry for the active becomes invalid. In that case, the lookup atomically switches to use the backup. I mentioned this use case at LPC2019[0] as a follow on use case for the nexthop code.

The first 6 patches refactor existing code to get ready for a new group type. The a-b group is added in patch 7 with selftests in patch 8.

[0] https://linuxplumbersconf.org/event/4/contributions/434/attachments/251/436/nexthop-objects-talk.pdf

David Ahern (8):
nexthop: Rename nexthop_free_mpath
nexthop: Refactor nexthop_select_path
nexthop: Refactor nexthop_for_each_fib6_nh
nexthop: Move nexthop_get_nhc_lookup to nexthop.c
nexthop: Move nexthop_uses_dev to nexthop.c
nexthop: Add primary_only argument to nexthop_for_each_fib6_nh
nexthop: Add support for active-backup nexthop type
selftests: Add active-backup nexthop tests

 include/net/nexthop.h                       | 106 +++---
 include/uapi/linux/nexthop.h                |   1 +
 net/ipv4/fib_semantics.c                    |   6 +-
 net/ipv4/nexthop.c                          | 356 +++++++++++++++++---
 net/ipv6/ip6_fib.c                          |   4 +-
 net/ipv6/route.c                            |  37 +-
 tools/testing/selftests/net/fib_nexthops.sh | 334 +++++++++++++++++-
 7 files changed, 713 insertions(+), 131 deletions(-)
Signature · 1 line
2.21.1 (Apple Git-122.3)