nexthop: Emit a notification when a nexthop group is modified
authorIdo Schimmel <idosch@nvidia.com>
Wed, 4 Nov 2020 13:30:32 +0000 (15:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Nov 2020 19:28:49 +0000 (11:28 -0800)
commitf17bc33d7412bcca58825273d9f4abf84a87c4cb
tree8102ab98da045a8ab5e95f237c5020ff58d84a75
parent8c09c9f9d846cdd8a92604c591132985b04fd1d6
nexthop: Emit a notification when a nexthop group is modified

When a single nexthop is replaced, the configuration of all the groups
using the nexthop is effectively modified. In this case, emit a
notification in the nexthop notification chain for each modified group
so that listeners would not need to keep track of which nexthops are
member in which groups.

The notification can only be emitted after the new configuration (i.e.,
'struct nh_info') is pointed at by the old shell (i.e., 'struct
nexthop'). Before that the configuration of the nexthop groups is still
the same as before the replacement.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/nexthop.c