summaryrefslogtreecommitdiff
path: root/rust/helpers/blk.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2025-04-02 14:42:23 +0300
committerJakub Kicinski <kuba@kernel.org>2025-04-04 17:30:07 +0300
commit4d0ab3a6885e3e9040310a8d8f54503366083626 (patch)
tree6de630380300a9736dee669cfed465bee3bc40d9 /rust/helpers/blk.c
parent51de3600093429e3b712e5f091d767babc5dd6df (diff)
downloadlinux-4d0ab3a6885e3e9040310a8d8f54503366083626.tar.xz
ipv6: Start path selection from the first nexthop
Cited commit transitioned IPv6 path selection to use hash-threshold instead of modulo-N. With hash-threshold, each nexthop is assigned a region boundary in the multipath hash function's output space and a nexthop is chosen if the calculated hash is smaller than the nexthop's region boundary. Hash-threshold does not work correctly if path selection does not start with the first nexthop. For example, if fib6_select_path() is always passed the last nexthop in the group, then it will always be chosen because its region boundary covers the entire hash function's output space. Fix this by starting the selection process from the first nexthop and do not consider nexthops for which rt6_score_route() provided a negative score. Fixes: 3d709f69a3e7 ("ipv6: Use hash-threshold instead of modulo-N") Reported-by: Stanislav Fomichev <stfomichev@gmail.com> Closes: https://lore.kernel.org/netdev/Z9RIyKZDNoka53EO@mini-arch/ Signed-off-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20250402114224.293392-2-idosch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/blk.c')
0 files changed, 0 insertions, 0 deletions