diff options
author | Ido Schimmel <idosch@mellanox.com> | 2017-03-10 08:56:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-10 09:45:09 -0800 |
commit | c0243892cbb0e48873d6132f673c830602808245 (patch) | |
tree | 8791a5ccdf38e91a3b9d7a091772287cb8c03088 /include/net/ip_fib.h | |
parent | 71e8727ebee78f7f6711f272d6ba5d78d0852835 (diff) | |
download | op-kernel-dev-c0243892cbb0e48873d6132f673c830602808245.zip op-kernel-dev-c0243892cbb0e48873d6132f673c830602808245.tar.gz |
ipv4: fib: Move FIB notification code to a separate file
Most of the code concerned with the FIB notification chain currently
resides in fib_trie.c, but this isn't really appropriate, as the FIB
notification chain is also used for FIB rules.
Therefore, it makes sense to move the common FIB notification code to a
separate file and have it export the relevant functions, which can be
invoked by its different users (e.g., fib_trie.c, fib_rules.c).
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: David Ahern <dsa@cumulusnetworks.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.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 368bb40..3ad8706 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -232,9 +232,24 @@ enum fib_event_type { int register_fib_notifier(struct notifier_block *nb, void (*cb)(struct notifier_block *nb)); int unregister_fib_notifier(struct notifier_block *nb); +int call_fib_notifier(struct notifier_block *nb, struct net *net, + enum fib_event_type event_type, + struct fib_notifier_info *info); int call_fib_notifiers(struct net *net, enum fib_event_type event_type, struct fib_notifier_info *info); +void fib_notify(struct net *net, struct notifier_block *nb, + enum fib_event_type event_type); +#ifdef CONFIG_IP_MULTIPLE_TABLES +void fib_rules_notify(struct net *net, struct notifier_block *nb, + enum fib_event_type event_type); +#else +static inline void fib_rules_notify(struct net *net, struct notifier_block *nb, + enum fib_event_type event_type) +{ +} +#endif + struct fib_table { struct hlist_node tb_hlist; u32 tb_id; |