]> 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)
commita9b9bea68c0e64a4b90275d5f3e7d48b092cf89c
treefe11da750ce221ccc7d2e01eec2afc1badb7c415
parentede56201d5e39b6068ea07c220687bb8daba7d34
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