netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] nexthop: Refactor and fix nexthop selection for multipath routes
@ 2023-05-29 20:19 Benjamin Poirier
  2023-05-29 20:19 ` [PATCH net-next 1/4] nexthop: Factor out hash threshold fdb nexthop selection Benjamin Poirier
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Benjamin Poirier @ 2023-05-29 20:19 UTC (permalink / raw)
  To: netdev; +Cc: David Ahern, Shuah Khan, linux-kselftest, Ido Schimmel

In order to select a nexthop for multipath routes, fib_select_multipath()
is used with legacy nexthops and nexthop_select_path_hthr() is used with
nexthop objects. Those two functions perform a validity test on the
neighbor related to each nexthop but their logic is structured differently.
This causes a divergence in behavior and nexthop_select_path_hthr() may
return a nexthop that failed the neighbor validity test even if there was
one that passed.

Refactor nexthop_select_path_hthr() to make it more similar to
fib_select_multipath() and fix the problem mentioned above.

Benjamin Poirier (4):
  nexthop: Factor out hash threshold fdb nexthop selection
  nexthop: Factor out neighbor validity check
  nexthop: Do not return invalid nexthop object during multipath
    selection
  selftests: net: Add test cases for nexthop groups with invalid
    neighbors

 net/ipv4/nexthop.c                          |  64 +++++++---
 tools/testing/selftests/net/fib_nexthops.sh | 129 ++++++++++++++++++++
 2 files changed, 174 insertions(+), 19 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-07-19 13:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-29 20:19 [PATCH net-next 0/4] nexthop: Refactor and fix nexthop selection for multipath routes Benjamin Poirier
2023-05-29 20:19 ` [PATCH net-next 1/4] nexthop: Factor out hash threshold fdb nexthop selection Benjamin Poirier
2023-05-30 14:57   ` David Ahern
2023-07-19 13:54     ` Benjamin Poirier
2023-05-29 20:19 ` [PATCH net-next 2/4] nexthop: Factor out neighbor validity check Benjamin Poirier
2023-05-30 14:58   ` David Ahern
2023-05-29 20:19 ` [PATCH net-next 3/4] nexthop: Do not return invalid nexthop object during multipath selection Benjamin Poirier
2023-05-30 15:08   ` David Ahern
2023-05-31  6:04     ` Ido Schimmel
2023-05-29 20:19 ` [PATCH net-next 4/4] selftests: net: Add test cases for nexthop groups with invalid neighbors Benjamin Poirier
2023-05-30 15:10   ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).