ipv6: Add explicit flush indication to routes
authorIdo Schimmel <idosch@mellanox.com>
Sun, 7 Jan 2018 10:45:11 +0000 (12:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jan 2018 02:29:40 +0000 (21:29 -0500)
commita2c554d3f8f65dd9c46a55811efad8156e328f85
treef2b1ddec71b51c1108d76d11a3765aa45fff0ad7
parentf9d882ea5705cf03f547e75ac515f1457c89f526
ipv6: Add explicit flush indication to routes

When routes that are a part of a multipath route are evaluated by
fib6_ifdown() in response to NETDEV_DOWN and NETDEV_UNREGISTER events
the state of their sibling routes is not considered.

This will change in subsequent patches in order to align IPv6 with
IPv4's behavior. For example, when the last sibling in a multipath route
becomes dead, the entire multipath route needs to be removed.

To prevent the tree walker from re-evaluating all the sibling routes
each time, we can simply evaluate them once - when the first sibling is
traversed.

If we determine the entire multipath route needs to be removed, then the
'should_flush' bit is set in all the siblings, which will cause the
walker to flush them when it traverses them.

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