]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd3bb819569a1171e6fe7e3faa3c4b0da4ce259d9
tree8102ab98da045a8ab5e95f237c5020ff58d84a75
parent845c3390a9e50adc376a8f65f091940a2f40c001
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