]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ipv6: Use hash-threshold instead of modulo-N
authorIdo Schimmel <idosch@mellanox.com>
Tue, 9 Jan 2018 14:40:27 +0000 (16:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Jan 2018 20:14:44 +0000 (15:14 -0500)
commit3d709f69a3e749f4d1c195dab499df8ab66e25a8
treefe11da750ce221ccc7d2e01eec2afc1badb7c415
parent7696c06a189c0f1f4d0a7e49e28d10e1050ec529
ipv6: Use hash-threshold instead of modulo-N

Now that each nexthop stores its region boundary in the multipath hash
function's output space, we can use hash-threshold instead of modulo-N
in multipath selection.

This reduces the number of checks we need to perform during lookup, as
dead and linkdown nexthops are assigned a negative region boundary. In
addition, in contrast to modulo-N, only flows near region boundaries are
affected when a nexthop is added or removed.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c