aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorGravatar Amit Cohen <amcohen@nvidia.com> 2021-02-07 10:22:53 +0200
committerGravatar David S. Miller <davem@davemloft.net> 2021-02-08 16:47:03 -0800
commit6fad361ae9f43616bc6a3acc9180e75396031fe1 (patch)
tree0d9d9b1da44c6b71e9d82dc2f1a6e572fac6e828 /net/ipv6/route.c
parentIPv6: Add "offload failed" indication to routes (diff)
downloadlinux-6fad361ae9f43616bc6a3acc9180e75396031fe1.tar.gz
linux-6fad361ae9f43616bc6a3acc9180e75396031fe1.tar.bz2
linux-6fad361ae9f43616bc6a3acc9180e75396031fe1.zip
IPv6: Extend 'fib_notify_on_flag_change' sysctl
Add the value '2' to 'fib_notify_on_flag_change' to allow sending notifications only for failed route installation. Separate value is added for such notifications because there are less of them, so they do not impact performance and some users will find them more important. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index bc75b705f54b..1536f4948e86 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -6083,6 +6083,12 @@ void fib6_info_hw_flags_set(struct net *net, struct fib6_info *f6i,
f6i->offload = offload;
f6i->trap = trap;
+
+ /* 2 means send notifications only if offload_failed was changed. */
+ if (net->ipv6.sysctl.fib_notify_on_flag_change == 2 &&
+ f6i->offload_failed == offload_failed)
+ return;
+
f6i->offload_failed = offload_failed;
if (!rcu_access_pointer(f6i->fib6_node))