]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0b4117f23f6e70e29e7a929e1d951ee1d907117a
tree556409e1712616ad795a553fed8ff3b793bca1ca
parentae0d9ed6573b7765f450b9b0eb5fcbcb0764109a
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