diff options
author | Yuval Mintz <yuvalm@mellanox.com> | 2018-03-26 15:01:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-26 20:14:42 +0300 |
commit | 54c4cad97b8fd414909b78d4274a6797baa52b3b (patch) | |
tree | fc3ddfbf44faa93392047ac1ad1eaf458cb7524d /net | |
parent | bc67a0daf8f3bc6fa8fcb68090f3c444de7f951c (diff) | |
download | linux-54c4cad97b8fd414909b78d4274a6797baa52b3b.tar.xz |
ipmr: Make MFC fib notifiers common
Like vif notifications, move the notifier struct for MFC as well as its
helpers into a common file; Currently they're only used by ipmr.
Signed-off-by: Yuval Mintz <yuvalm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ipmr.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index bb1a0655f8e4..470956d2d8ad 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -669,34 +669,16 @@ static int call_ipmr_mfc_entry_notifier(struct notifier_block *nb, enum fib_event_type event_type, struct mfc_cache *mfc, u32 tb_id) { - struct mfc_entry_notifier_info info = { - .info = { - .family = RTNL_FAMILY_IPMR, - .net = net, - }, - .mfc = mfc, - .tb_id = tb_id - }; - - return call_fib_notifier(nb, net, event_type, &info.info); + return mr_call_mfc_notifier(nb, net, RTNL_FAMILY_IPMR, + event_type, &mfc->_c, tb_id); } static int call_ipmr_mfc_entry_notifiers(struct net *net, enum fib_event_type event_type, struct mfc_cache *mfc, u32 tb_id) { - struct mfc_entry_notifier_info info = { - .info = { - .family = RTNL_FAMILY_IPMR, - .net = net, - }, - .mfc = mfc, - .tb_id = tb_id - }; - - ASSERT_RTNL(); - net->ipv4.ipmr_seq++; - return call_fib_notifiers(net, event_type, &info.info); + return mr_call_mfc_notifiers(net, RTNL_FAMILY_IPMR, event_type, + &mfc->_c, tb_id, &net->ipv4.ipmr_seq); } /** |