Merge branch 'nexthop-refactor-and-fix-nexthop-selection-for-multipath-routes'
authorJakub Kicinski <kuba@kernel.org>
Fri, 21 Jul 2023 03:23:23 +0000 (20:23 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Jul 2023 03:23:23 +0000 (20:23 -0700)
commitbf837e8f7df873a6bb8a472550b1876100c60ddc
tree4da7bcbc76c9a1727ade2934ed1859aa82828c1b
parent022add1d73f14f021e0e0aa91304b83ad7169398
parentc7e95bbda82207ae81095dfa8d09ef1d6519a63d
Merge branch 'nexthop-refactor-and-fix-nexthop-selection-for-multipath-routes'

Benjamin Poirier says:

====================
nexthop: Refactor and fix nexthop selection for multipath routes

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.

v1: https://lore.kernel.org/netdev/20230529201914.69828-1-bpoirier@nvidia.com/
====================

Link: https://lore.kernel.org/r/20230719-nh_select-v2-0-04383e89f868@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>