OSDN Git Service

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

When a single nexthop is deleted, 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.

In the rare cases where the notification fails, emit an error to the
kernel log. This is done by allocating extack on the stack and printing
the error logged by the listener that rejected the notification.

Changes since RFC:
* Allocate extack on the stack

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