summaryrefslogtreecommitdiff
path: root/include/net/ip_fib.h
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2017-03-16 09:08:13 +0100
committerDavid S. Miller <davem@davemloft.net>2017-03-16 10:18:33 -0700
commit6a003a5ff29499a94373110202631743663569c6 (patch)
tree2a4695f68d2a3177951e24294637f610b2d16bf1 /include/net/ip_fib.h
parent3c71006d15fd3a99071a2b20d01de3edabc85767 (diff)
ipv4: fib_rules: Add notifier info to FIB rules notifications
Whenever a FIB rule is added or removed, a notification is sent in the FIB notification chain. However, listeners don't have a way to tell which rule was added or removed. This is problematic as we would like to give listeners the ability to decide which action to execute based on the notified rule. Specifically, offloading drivers should be able to determine if they support the reflection of the notified FIB rule and flush their LPM tables in case they don't. Do that by adding a notifier info to these notifications and embed the common FIB rule struct in it. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip_fib.h')
-rw-r--r--include/net/ip_fib.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index da6fa7b15558..272e62e139e0 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -213,6 +213,11 @@ struct fib_entry_notifier_info {
u32 tb_id;
};
+struct fib_rule_notifier_info {
+ struct fib_notifier_info info; /* must be first */
+ struct fib_rule *rule;
+};
+
struct fib_nh_notifier_info {
struct fib_notifier_info info; /* must be first */
struct fib_nh *fib_nh;