]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Calculate hash thresholds for IPv6 nexthops
authorIdo Schimmel <idosch@mellanox.com>
Tue, 9 Jan 2018 14:40:25 +0000 (16:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Jan 2018 20:14:44 +0000 (15:14 -0500)
commiteb63a3c6b3815aad679b9370c4a98dfd31709fbc
tree7d59d50b661562ccf2cfad936be59b37f7f69b99
parent08efc242a472cee323bf14ffa9a66e5e2050474b
ipv6: Calculate hash thresholds for IPv6 nexthops

Before we convert IPv6 to use hash-threshold instead of modulo-N, we
first need each nexthop to store its region boundary in the hash
function's output space.

The boundary is calculated by dividing the output space equally between
the different active nexthops. That is, nexthops that are not dead or
linkdown.

The boundaries are rebalanced whenever a nexthop is added or removed to
a multipath route and whenever a nexthop becomes active or inactive.

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