]> git.baikalelectronics.ru Git - 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)
commit72e5b54fbd62cf4f93fa97c32ce96cdf3c3bdedf
treefe11da750ce221ccc7d2e01eec2afc1badb7c415
parent0c52491cc853d147890b5091716c21b7518f2617
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