Skip to content

ipv6: Move exceptions to fib6_nh and make it optional in a fib6_info

David Ahern netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ipv6: Move pcpu cached routes to fib6_nhinclude/net/ip6_fib.h net/ipv6/addrconf.c net/ipv6/ip6_fib.c +1 more+38 -340 replies
2/7ipv6: Refactor fib6_drop_pcpu_fromnet/ipv6/ip6_fib.c+25 -100 replies
3/7ipv6: Refactor exception functionsnet/ipv6/route.c+86 -480 replies
4/7ipv6: Move exception bucket to fib6_nhinclude/net/ip6_fib.h net/ipv6/ip6_fib.c net/ipv6/route.c+126 -730 replies
5/7ipv6: Make fib6_nh optional at the end of fib6_infodrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c include/net/ip6_fib.h include/net/ip6_route.h +4 more+106 -1010 replies
6/7ipv6: Refactor ip6_route_del for cached routesnet/ipv6/route.c+21 -150 replies
7/7selftests: Add redirect teststools/testing/selftests/net/icmp_redirect.sh+455 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH net-next 0/7] ipv6: Move exceptions to fib6_nh and make it optional in a fib6_info

From: David Ahern <[email protected]>

Patches 1 and 4 move pcpu and exception caches from fib6_info to fib6_nh. With respect to the current FIB entries this is only a movement from one struct to another contained within the first.

Patch 2 refactors the core logic of fib6_drop_pcpu_from into a helper that is invoked per fib6_nh.

Patch 3 refactors exception handling in a similar way - creating a bunch of helpers that can be invoked per fib6_nh with the goal of making patch 4 easier to review as well as creating the code needed for nexthop objects.

Patch 5 makes a fib6_nh at the end of a fib6_info an array similar to IPv4 and its fib_info. For the current fib entry model, all fib6_info will have a fib6_nh allocated for it.

Patch 6 refactors ip6_route_del moving the code for deleting an exception entry into a new function.

Patch 7 adds tests for redirect route exceptions. The new test was written against 5.1 (before any of the nexthop refactoring). It and the pmtu.sh selftest exercise the exception code paths - from creating exceptions to cleaning them up on device delete. All tests pass without any rcu locking or memleak warnings.

David Ahern (7):
ipv6: Move pcpu cached routes to fib6_nh
ipv6: Refactor fib6_drop_pcpu_from
ipv6: Refactor exception functions
ipv6: Move exception bucket to fib6_nh
ipv6: Make fib6_nh optional at the end of fib6_info
ipv6: Refactor ip6_route_del for cached routes
selftests: Add redirect tests

 .../net/ethernet/mellanox/mlxsw/spectrum_router.c  |  31 +-
 include/net/ip6_fib.h                              |  17 +-
 include/net/ip6_route.h                            |   4 +-
 net/ipv6/addrconf.c                                |  10 +-
 net/ipv6/ip6_fib.c                                 |  87 ++--
 net/ipv6/ndisc.c                                   |   8 +-
 net/ipv6/route.c                                   | 452 ++++++++++++--------
 tools/testing/selftests/net/icmp_redirect.sh       | 455 +++++++++++++++++++++
 8 files changed, 820 insertions(+), 244 deletions(-)
 create mode 100755 tools/testing/selftests/net/icmp_redirect.sh
Signature · 1 line
2.11.0