]> 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)
commitae0d9ed6573b7765f450b9b0eb5fcbcb0764109a
tree8102ab98da045a8ab5e95f237c5020ff58d84a75
parentde048818d86319237c6a73b13f0edc65bf88f3c3
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