History

net: fib_notifier: make FIB notifier per-netns

Currently all users of FIB notifier only cares about events in init_net. Later in this patchset, users get interested in other namespaces too. However, for every registered block user is interested only about one namespace. Make the FIB notifier registration per-netns and avoid unnecessary calls of notifier block for other namespaces.

Jiri Pirko committed 7 years ago

Commit 7c550da1 parent a5facc415 files · +78 −105Browse files

Unified · Split

15 files
  1. drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c +2 −5
  2. drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +4 −5
  3. drivers/net/ethernet/rocker/rocker_main.c +3 −6
  4. drivers/net/netdevsim/fib.c +3 −5
  5. include/linux/mroute_base.h +2 −8
  6. include/net/fib_notifier.h +3 −4
  7. include/net/ip6_fib.h +1 −1
  8. include/net/ip_fib.h +1 −1
  9. net/core/fib_notifier.c +39 −48
  10. net/core/fib_rules.c +3 −4
  11. net/ipv4/fib_notifier.c +2 −2
  12. net/ipv4/fib_trie.c +8 −9
  13. net/ipv4/ipmr_base.c +2 −2
  14. net/ipv6/fib6_notifier.c +2 −2
  15. net/ipv6/ip6_fib.c +3 −3
drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c+2−5
@@ -248,9 +248,6 @@ static int mlx5_lag_fib_event(struct notifier_block *nb, · 247 unmodified lines
248248 struct net_device *fib_dev;
249249 struct fib_info *fi;
250250
251− if (!net_eq(info->net, &init_net))
252− return NOTIFY_DONE;
253−
254251 if (info->family != AF_INET)
255252 return NOTIFY_DONE;
256253
@@ -311,7 +308,7 @@ int mlx5_lag_mp_init(struct mlx5_lag *ldev) · 54 unmodified lines
311308 return 0;
312309
313310 mp->fib_nb.notifier_call = mlx5_lag_fib_event;
314− err = register_fib_notifier(&mp->fib_nb,
311+ err = register_fib_notifier(&init_net, &mp->fib_nb,
315312 mlx5_lag_fib_event_flush);
316313 if (err)
317314 mp->fib_nb.notifier_call = NULL;
@@ -326,6 +323,6 @@ void mlx5_lag_mp_cleanup(struct mlx5_lag *ldev) · 8 unmodified lines
326323 if (!mp->fib_nb.notifier_call)
327324 return;
328325
329− unregister_fib_notifier(&mp->fib_nb);
326+ unregister_fib_notifier(&init_net, &mp->fib_nb);
330327 mp->fib_nb.notifier_call = NULL;
331328 }
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+4−5
@@ -6213,7 +6213,7 @@ static int mlxsw_sp_router_fib_rule_event(unsigned long event, · 6212 unmodified lines
62136213 rule = fr_info->rule;
62146214
62156215 /* Rule only affects locally generated traffic */
6216− if (rule->iifindex == info->net->loopback_dev->ifindex)
6216+ if (rule->iifindex == init_net.loopback_dev->ifindex)
62176217 return 0;
62186218
62196219 switch (info->family) {
@@ -6250,8 +6250,7 @@ static int mlxsw_sp_router_fib_event(struct notifier_block *nb, · 30 unmodified lines
62506250 struct mlxsw_sp_router *router;
62516251 int err;
62526252
6253− if (!net_eq(info->net, &init_net) ||
6254− (info->family != AF_INET && info->family != AF_INET6 &&
6253+ if ((info->family != AF_INET && info->family != AF_INET6 &&
62556254 info->family != RTNL_FAMILY_IPMR &&
62566255 info->family != RTNL_FAMILY_IP6MR))
62576256 return NOTIFY_DONE;
@@ -8155,7 +8154,7 @@ int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp) · 1897 unmodified lines
81558154 goto err_dscp_init;
81568155
81578156 mlxsw_sp->router->fib_nb.notifier_call = mlxsw_sp_router_fib_event;
8158− err = register_fib_notifier(&mlxsw_sp->router->fib_nb,
8157+ err = register_fib_notifier(&init_net, &mlxsw_sp->router->fib_nb,
81598158 mlxsw_sp_router_fib_dump_flush);
81608159 if (err)
81618160 goto err_register_fib_notifier;
@@ -8195,7 +8194,7 @@ err_register_inetaddr_notifier: · 33 unmodified lines
81958194
81968195 void mlxsw_sp_router_fini(struct mlxsw_sp *mlxsw_sp)
81978196 {
8198− unregister_fib_notifier(&mlxsw_sp->router->fib_nb);
8197+ unregister_fib_notifier(&init_net, &mlxsw_sp->router->fib_nb);
81998198 unregister_netevent_notifier(&mlxsw_sp->router->netevent_nb);
82008199 mlxsw_sp_neigh_fini(mlxsw_sp);
82018200 mlxsw_sp_vrs_fini(mlxsw_sp);
drivers/net/ethernet/rocker/rocker_main.c+3−6
@@ -2189,9 +2189,6 @@ static int rocker_router_fib_event(struct notifier_block *nb, · 2188 unmodified lines
21892189 struct rocker_fib_event_work *fib_work;
21902190 struct fib_notifier_info *info = ptr;
21912191
2192− if (!net_eq(info->net, &init_net))
2193− return NOTIFY_DONE;
2194−
21952192 if (info->family != AF_INET)
21962193 return NOTIFY_DONE;
21972194
@@ -2994,7 +2991,7 @@ static int rocker_probe(struct pci_dev *pdev, const struct pci_device_id *id) · 796 unmodified lines
29942991 * the device, so no need to pass a callback.
29952992 */
29962993 rocker->fib_nb.notifier_call = rocker_router_fib_event;
2997− err = register_fib_notifier(&rocker->fib_nb, NULL);
2994+ err = register_fib_notifier(&init_net, &rocker->fib_nb, NULL);
29982995 if (err)
29992996 goto err_register_fib_notifier;
30002997
@@ -3021,7 +3018,7 @@ static int rocker_probe(struct pci_dev *pdev, const struct pci_device_id *id) · 20 unmodified lines
30213018 err_register_switchdev_blocking_notifier:
30223019 unregister_switchdev_notifier(&rocker_switchdev_notifier);
30233020 err_register_switchdev_notifier:
3024− unregister_fib_notifier(&rocker->fib_nb);
3021+ unregister_fib_notifier(&init_net, &rocker->fib_nb);
30253022 err_register_fib_notifier:
30263023 rocker_remove_ports(rocker);
30273024 err_probe_ports:
@@ -3057,7 +3054,7 @@ static void rocker_remove(struct pci_dev *pdev) · 29 unmodified lines
30573054 unregister_switchdev_blocking_notifier(nb);
30583055
30593056 unregister_switchdev_notifier(&rocker_switchdev_notifier);
3060− unregister_fib_notifier(&rocker->fib_nb);
3057+ unregister_fib_notifier(&init_net, &rocker->fib_nb);
30613058 rocker_remove_ports(rocker);
30623059 rocker_write32(rocker, CONTROL, ROCKER_CONTROL_RESET);
30633060 destroy_workqueue(rocker->rocker_owq);
drivers/net/netdevsim/fib.c+3−5
@@ -182,9 +182,6 @@ static int nsim_fib_event_nb(struct notifier_block *nb, unsigned long event, · 181 unmodified lines
182182 struct fib_notifier_info *info = ptr;
183183 int err = 0;
184184
185− if (!net_eq(info->net, &init_net))
186− return NOTIFY_DONE;
187−
188185 switch (event) {
189186 case FIB_EVENT_RULE_ADD: /* fall through */
190187 case FIB_EVENT_RULE_DEL:
@@ -258,7 +255,8 @@ struct nsim_fib_data *nsim_fib_create(struct devlink *devlink) · 67 unmodified lines
258255 data->ipv6.rules.max = (u64)-1;
259256
260257 data->fib_nb.notifier_call = nsim_fib_event_nb;
261− err = register_fib_notifier(&data->fib_nb, nsim_fib_dump_inconsistent);
258+ err = register_fib_notifier(&init_net, &data->fib_nb,
259+ nsim_fib_dump_inconsistent);
262260 if (err) {
263261 pr_err("Failed to register fib notifier\n");
264262 goto err_out;
@@ -297,6 +295,6 @@ void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *data) · 32 unmodified lines
297295 NSIM_RESOURCE_IPV4_FIB_RULES);
298296 devlink_resource_occ_get_unregister(devlink,
299297 NSIM_RESOURCE_IPV4_FIB);
300− unregister_fib_notifier(&data->fib_nb);
298+ unregister_fib_notifier(&init_net, &data->fib_nb);
301299 kfree(data);
302300 }
include/linux/mroute_base.h+2−8
@@ -47,7 +47,6 @@ struct vif_entry_notifier_info { · 46 unmodified lines
4747 };
4848
4949 static inline int mr_call_vif_notifier(struct notifier_block *nb,
50− struct net *net,
5150 unsigned short family,
5251 enum fib_event_type event_type,
5352 struct vif_device *vif,
@@ -56,7 +55,6 @@ static inline int mr_call_vif_notifier(struct notifier_block *nb, · 2 unmodified lines
5655 struct vif_entry_notifier_info info = {
5756 .info = {
5857 .family = family,
59− .net = net,
6058 },
6159 .dev = vif->dev,
6260 .vif_index = vif_index,
@@ -64,7 +62,7 @@ static inline int mr_call_vif_notifier(struct notifier_block *nb, · 1 unmodified line
6462 .tb_id = tb_id,
6563 };
6664
67− return call_fib_notifier(nb, net, event_type, &info.info);
65+ return call_fib_notifier(nb, event_type, &info.info);
6866 }
6967
7068 static inline int mr_call_vif_notifiers(struct net *net,
@@ -77,7 +75,6 @@ static inline int mr_call_vif_notifiers(struct net *net, · 6 unmodified lines
7775 struct vif_entry_notifier_info info = {
7876 .info = {
7977 .family = family,
80− .net = net,
8178 },
8279 .dev = vif->dev,
8380 .vif_index = vif_index,
@@ -173,7 +170,6 @@ struct mfc_entry_notifier_info { · 89 unmodified lines
173170 };
174171
175172 static inline int mr_call_mfc_notifier(struct notifier_block *nb,
176− struct net *net,
177173 unsigned short family,
178174 enum fib_event_type event_type,
179175 struct mr_mfc *mfc, u32 tb_id)
@@ -181,13 +177,12 @@ static inline int mr_call_mfc_notifier(struct notifier_block *nb, · 1 unmodified line
181177 struct mfc_entry_notifier_info info = {
182178 .info = {
183179 .family = family,
184− .net = net,
185180 },
186181 .mfc = mfc,
187182 .tb_id = tb_id
188183 };
189184
190− return call_fib_notifier(nb, net, event_type, &info.info);
185+ return call_fib_notifier(nb, event_type, &info.info);
191186 }
192187
193188 static inline int mr_call_mfc_notifiers(struct net *net,
@@ -199,7 +194,6 @@ static inline int mr_call_mfc_notifiers(struct net *net, · 5 unmodified lines
199194 struct mfc_entry_notifier_info info = {
200195 .info = {
201196 .family = family,
202− .net = net,
203197 },
204198 .mfc = mfc,
205199 .tb_id = tb_id
include/net/fib_notifier.h+3−4
@@ -8,7 +8,6 @@ · 7 unmodified lines
88 struct module;
99
1010 struct fib_notifier_info {
11− struct net *net;
1211 int family;
1312 struct netlink_ext_ack *extack;
1413 };
@@ -35,14 +34,14 @@ struct fib_notifier_ops { · 20 unmodified lines
3534 struct rcu_head rcu;
3635 };
3736
38−int call_fib_notifier(struct notifier_block *nb, struct net *net,
37+int call_fib_notifier(struct notifier_block *nb,
3938 enum fib_event_type event_type,
4039 struct fib_notifier_info *info);
4140 int call_fib_notifiers(struct net *net, enum fib_event_type event_type,
4241 struct fib_notifier_info *info);
43−int register_fib_notifier(struct notifier_block *nb,
42+int register_fib_notifier(struct net *net, struct notifier_block *nb,
4443 void (*cb)(struct notifier_block *nb));
45−int unregister_fib_notifier(struct notifier_block *nb);
44+int unregister_fib_notifier(struct net *net, struct notifier_block *nb);
4645 struct fib_notifier_ops *
4746 fib_notifier_ops_register(const struct fib_notifier_ops *tmpl, struct net *net);
4847 void fib_notifier_ops_unregister(struct fib_notifier_ops *ops);
include/net/ip6_fib.h+1−1
@@ -478,7 +478,7 @@ struct ipv6_route_iter { · 477 unmodified lines
478478
479479 extern const struct seq_operations ipv6_route_seq_ops;
480480
481−int call_fib6_notifier(struct notifier_block *nb, struct net *net,
481+int call_fib6_notifier(struct notifier_block *nb,
482482 enum fib_event_type event_type,
483483 struct fib_notifier_info *info);
484484 int call_fib6_notifiers(struct net *net, enum fib_event_type event_type,
include/net/ip_fib.h+1−1
@@ -219,7 +219,7 @@ struct fib_nh_notifier_info { · 218 unmodified lines
219219 struct fib_nh *fib_nh;
220220 };
221221
222−int call_fib4_notifier(struct notifier_block *nb, struct net *net,
222+int call_fib4_notifier(struct notifier_block *nb,
223223 enum fib_event_type event_type,
224224 struct fib_notifier_info *info);
225225 int call_fib4_notifiers(struct net *net, enum fib_event_type event_type,
net/core/fib_notifier.c+39−48
@@ -12,17 +12,15 @@ static unsigned int fib_notifier_net_id; · 11 unmodified lines
1212
1313 struct fib_notifier_net {
1414 struct list_head fib_notifier_ops;
15+ struct atomic_notifier_head fib_chain;
1516 };
1617
17−static ATOMIC_NOTIFIER_HEAD(fib_chain);
18−
19−int call_fib_notifier(struct notifier_block *nb, struct net *net,
18+int call_fib_notifier(struct notifier_block *nb,
2019 enum fib_event_type event_type,
2120 struct fib_notifier_info *info)
2221 {
2322 int err;
2423
25− info->net = net;
2624 err = nb->notifier_call(nb, event_type, info);
2725 return notifier_to_errno(err);
2826 }
@@ -31,35 +29,29 @@ EXPORT_SYMBOL(call_fib_notifier); · 2 unmodified lines
3129 int call_fib_notifiers(struct net *net, enum fib_event_type event_type,
3230 struct fib_notifier_info *info)
3331 {
32+ struct fib_notifier_net *fn_net = net_generic(net, fib_notifier_net_id);
3433 int err;
3534
36− info->net = net;
37− err = atomic_notifier_call_chain(&fib_chain, event_type, info);
35+ err = atomic_notifier_call_chain(&fn_net->fib_chain, event_type, info);
3836 return notifier_to_errno(err);
3937 }
4038 EXPORT_SYMBOL(call_fib_notifiers);
4139
42−static unsigned int fib_seq_sum(void)
40+static unsigned int fib_seq_sum(struct net *net)
4341 {
44− struct fib_notifier_net *fn_net;
42+ struct fib_notifier_net *fn_net = net_generic(net, fib_notifier_net_id);
4543 struct fib_notifier_ops *ops;
4644 unsigned int fib_seq = 0;
47− struct net *net;
4845
4946 rtnl_lock();
50− down_read(&net_rwsem);
51− for_each_net(net) {
52− fn_net = net_generic(net, fib_notifier_net_id);
53− rcu_read_lock();
54− list_for_each_entry_rcu(ops, &fn_net->fib_notifier_ops, list) {
55− if (!try_module_get(ops->owner))
56− continue;
57− fib_seq += ops->fib_seq_read(net);
58− module_put(ops->owner);
59− }
60− rcu_read_unlock();
47+ rcu_read_lock();
48+ list_for_each_entry_rcu(ops, &fn_net->fib_notifier_ops, list) {
49+ if (!try_module_get(ops->owner))
50+ continue;
51+ fib_seq += ops->fib_seq_read(net);
52+ module_put(ops->owner);
6153 }
62− up_read(&net_rwsem);
54+ rcu_read_unlock();
6355 rtnl_unlock();
6456
6557 return fib_seq;
@@ -69,68 +61,66 @@ static int fib_net_dump(struct net *net, struct notifier_block *nb) · 3 unmodified lines
6961 {
7062 struct fib_notifier_net *fn_net = net_generic(net, fib_notifier_net_id);
7163 struct fib_notifier_ops *ops;
64+ int err = 0;
7265
66+ rcu_read_lock();
7367 list_for_each_entry_rcu(ops, &fn_net->fib_notifier_ops, list) {
74− int err;
75−
7668 if (!try_module_get(ops->owner))
7769 continue;
7870 err = ops->fib_dump(net, nb);
7971 module_put(ops->owner);
8072 if (err)
81− return err;
73+ goto unlock;
8274 }
8375
84− return 0;
76+unlock:
77+ rcu_read_unlock();
78+
79+ return err;
8580 }
8681
87−static bool fib_dump_is_consistent(struct notifier_block *nb,
82+static bool fib_dump_is_consistent(struct net *net, struct notifier_block *nb,
8883 void (*cb)(struct notifier_block *nb),
8984 unsigned int fib_seq)
9085 {
91− atomic_notifier_chain_register(&fib_chain, nb);
92− if (fib_seq == fib_seq_sum())
86+ struct fib_notifier_net *fn_net = net_generic(net, fib_notifier_net_id);
87+
88+ atomic_notifier_chain_register(&fn_net->fib_chain, nb);
89+ if (fib_seq == fib_seq_sum(net))
9390 return true;
94− atomic_notifier_chain_unregister(&fib_chain, nb);
91+ atomic_notifier_chain_unregister(&fn_net->fib_chain, nb);
9592 if (cb)
9693 cb(nb);
9794 return false;
9895 }
9996
10097 #define FIB_DUMP_MAX_RETRIES 5
101−int register_fib_notifier(struct notifier_block *nb,
98+int register_fib_notifier(struct net *net, struct notifier_block *nb,
10299 void (*cb)(struct notifier_block *nb))
103100 {
104101 int retries = 0;
105102 int err;
106103
107104 do {
108− unsigned int fib_seq = fib_seq_sum();
109− struct net *net;
110−
111− rcu_read_lock();
112− for_each_net_rcu(net) {
113− err = fib_net_dump(net, nb);
114− if (err)
115− goto err_fib_net_dump;
116− }
117− rcu_read_unlock();
118−
119− if (fib_dump_is_consistent(nb, cb, fib_seq))
105+ unsigned int fib_seq = fib_seq_sum(net);
106+
107+ err = fib_net_dump(net, nb);
108+ if (err)
109+ return err;
110+
111+ if (fib_dump_is_consistent(net, nb, cb, fib_seq))
120112 return 0;
121113 } while (++retries < FIB_DUMP_MAX_RETRIES);
122114
123115 return -EBUSY;
124−
125−err_fib_net_dump:
126− rcu_read_unlock();
127− return err;
128116 }
129117 EXPORT_SYMBOL(register_fib_notifier);
130118
131−int unregister_fib_notifier(struct notifier_block *nb)
119+int unregister_fib_notifier(struct net *net, struct notifier_block *nb)
132120 {
133− return atomic_notifier_chain_unregister(&fib_chain, nb);
121+ struct fib_notifier_net *fn_net = net_generic(net, fib_notifier_net_id);
122+
123+ return atomic_notifier_chain_unregister(&fn_net->fib_chain, nb);
134124 }
135125 EXPORT_SYMBOL(unregister_fib_notifier);
136126
@@ -181,6 +171,7 @@ static int __net_init fib_notifier_net_init(struct net *net) · 44 unmodified lines
181171 struct fib_notifier_net *fn_net = net_generic(net, fib_notifier_net_id);
182172
183173 INIT_LIST_HEAD(&fn_net->fib_notifier_ops);
174+ ATOMIC_INIT_NOTIFIER_HEAD(&fn_net->fib_chain);
184175 return 0;
185176 }
186177
net/core/fib_rules.c+3−4
@@ -321,7 +321,7 @@ out: · 320 unmodified lines
321321 }
322322 EXPORT_SYMBOL_GPL(fib_rules_lookup);
323323
324−static int call_fib_rule_notifier(struct notifier_block *nb, struct net *net,
324+static int call_fib_rule_notifier(struct notifier_block *nb,
325325 enum fib_event_type event_type,
326326 struct fib_rule *rule, int family)
327327 {
@@ -330,7 +330,7 @@ static int call_fib_rule_notifier(struct notifier_block *nb, struct net *net, · 2 unmodified lines
330330 .rule = rule,
331331 };
332332
333− return call_fib_notifier(nb, net, event_type, &info.info);
333+ return call_fib_notifier(nb, event_type, &info.info);
334334 }
335335
336336 static int call_fib_rule_notifiers(struct net *net,
@@ -359,8 +359,7 @@ int fib_rules_dump(struct net *net, struct notifier_block *nb, int family) · 22 unmodified lines
359359 if (!ops)
360360 return -EAFNOSUPPORT;
361361 list_for_each_entry_rcu(rule, &ops->rules_list, list)
362− call_fib_rule_notifier(nb, net, FIB_EVENT_RULE_ADD, rule,
363− family);
362+ call_fib_rule_notifier(nb, FIB_EVENT_RULE_ADD, rule, family);
364363 rules_ops_put(ops);
365364
366365 return 0;
net/ipv4/fib_notifier.c+2−2
@@ -9,12 +9,12 @@ · 8 unmodified lines
99 #include <net/netns/ipv4.h>
1010 #include <net/ip_fib.h>
1111
12−int call_fib4_notifier(struct notifier_block *nb, struct net *net,
12+int call_fib4_notifier(struct notifier_block *nb,
1313 enum fib_event_type event_type,
1414 struct fib_notifier_info *info)
1515 {
1616 info->family = AF_INET;
17− return call_fib_notifier(nb, net, event_type, info);
17+ return call_fib_notifier(nb, event_type, info);
1818 }
1919
2020 int call_fib4_notifiers(struct net *net, enum fib_event_type event_type,
net/ipv4/fib_trie.c+8−9
@@ -74,7 +74,7 @@ · 73 unmodified lines
7474 #include <trace/events/fib.h>
7575 #include "fib_lookup.h"
7676
77−static int call_fib_entry_notifier(struct notifier_block *nb, struct net *net,
77+static int call_fib_entry_notifier(struct notifier_block *nb,
7878 enum fib_event_type event_type, u32 dst,
7979 int dst_len, struct fib_alias *fa)
8080 {
@@ -86,7 +86,7 @@ static int call_fib_entry_notifier(struct notifier_block *nb, struct net *net, · 5 unmodified lines
8686 .type = fa->fa_type,
8787 .tb_id = fa->tb_id,
8888 };
89− return call_fib4_notifier(nb, net, event_type, &info.info);
89+ return call_fib4_notifier(nb, event_type, &info.info);
9090 }
9191
9292 static int call_fib_entry_notifiers(struct net *net,
@@ -2015,8 +2015,8 @@ void fib_info_notify_update(struct net *net, struct nl_info *info) · 1922 unmodified lines
20152015 }
20162016 }
20172017
2018−static void fib_leaf_notify(struct net *net, struct key_vector *l,
2019− struct fib_table *tb, struct notifier_block *nb)
2018+static void fib_leaf_notify(struct key_vector *l, struct fib_table *tb,
2019+ struct notifier_block *nb)
20202020 {
20212021 struct fib_alias *fa;
20222022
@@ -2032,20 +2032,19 @@ static void fib_leaf_notify(struct net *net, struct key_vector *l, · 9 unmodified lines
20322032 if (tb->tb_id != fa->tb_id)
20332033 continue;
20342034
2035− call_fib_entry_notifier(nb, net, FIB_EVENT_ENTRY_ADD, l->key,
2035+ call_fib_entry_notifier(nb, FIB_EVENT_ENTRY_ADD, l->key,
20362036 KEYLENGTH - fa->fa_slen, fa);
20372037 }
20382038 }
20392039
2040−static void fib_table_notify(struct net *net, struct fib_table *tb,
2041− struct notifier_block *nb)
2040+static void fib_table_notify(struct fib_table *tb, struct notifier_block *nb)
20422041 {
20432042 struct trie *t = (struct trie *)tb->tb_data;
20442043 struct key_vector *l, *tp = t->kv;
20452044 t_key key = 0;
20462045
20472046 while ((l = leaf_walk_rcu(&tp, key)) != NULL) {
2048− fib_leaf_notify(net, l, tb, nb);
2047+ fib_leaf_notify(l, tb, nb);
20492048
20502049 key = l->key + 1;
20512050 /* stop in case of wrap around */
@@ -2063,7 +2062,7 @@ void fib_notify(struct net *net, struct notifier_block *nb) · 11 unmodified lines
20632062 struct fib_table *tb;
20642063
20652064 hlist_for_each_entry_rcu(tb, head, tb_hlist)
2066− fib_table_notify(net, tb, nb);
2065+ fib_table_notify(tb, nb);
20672066 }
20682067 }
20692068
net/ipv4/ipmr_base.c+2−2
@@ -409,7 +409,7 @@ int mr_dump(struct net *net, struct notifier_block *nb, unsigned short family, · 408 unmodified lines
409409 if (!v->dev)
410410 continue;
411411
412− mr_call_vif_notifier(nb, net, family,
412+ mr_call_vif_notifier(nb, family,
413413 FIB_EVENT_VIF_ADD,
414414 v, vifi, mrt->id);
415415 }
@@ -417,7 +417,7 @@ int mr_dump(struct net *net, struct notifier_block *nb, unsigned short family, · 1 unmodified line
417417
418418 /* Notify on table MFC entries */
419419 list_for_each_entry_rcu(mfc, &mrt->mfc_cache_list, list)
420− mr_call_mfc_notifier(nb, net, family,
420+ mr_call_mfc_notifier(nb, family,
421421 FIB_EVENT_ENTRY_ADD,
422422 mfc, mrt->id);
423423 }
net/ipv6/fib6_notifier.c+2−2
@@ -7,12 +7,12 @@ · 6 unmodified lines
77 #include <net/netns/ipv6.h>
88 #include <net/ip6_fib.h>
99
10−int call_fib6_notifier(struct notifier_block *nb, struct net *net,
10+int call_fib6_notifier(struct notifier_block *nb,
1111 enum fib_event_type event_type,
1212 struct fib_notifier_info *info)
1313 {
1414 info->family = AF_INET6;
15− return call_fib_notifier(nb, net, event_type, info);
15+ return call_fib_notifier(nb, event_type, info);
1616 }
1717
1818 int call_fib6_notifiers(struct net *net, enum fib_event_type event_type,
net/ipv6/ip6_fib.c+3−3
@@ -357,7 +357,7 @@ unsigned int fib6_tables_seq_read(struct net *net) · 356 unmodified lines
357357 return fib_seq;
358358 }
359359
360−static int call_fib6_entry_notifier(struct notifier_block *nb, struct net *net,
360+static int call_fib6_entry_notifier(struct notifier_block *nb,
361361 enum fib_event_type event_type,
362362 struct fib6_info *rt)
363363 {
@@ -365,7 +365,7 @@ static int call_fib6_entry_notifier(struct notifier_block *nb, struct net *net, · 1 unmodified line
365365 .rt = rt,
366366 };
367367
368− return call_fib6_notifier(nb, net, event_type, &info.info);
368+ return call_fib6_notifier(nb, event_type, &info.info);
369369 }
370370
371371 int call_fib6_entry_notifiers(struct net *net,
@@ -407,7 +407,7 @@ static void fib6_rt_dump(struct fib6_info *rt, struct fib6_dump_arg *arg) · 35 unmodified lines
407407 {
408408 if (rt == arg->net->ipv6.fib6_null_entry)
409409 return;
410− call_fib6_entry_notifier(arg->nb, arg->net, FIB_EVENT_ENTRY_ADD, rt);
410+ call_fib6_entry_notifier(arg->nb, FIB_EVENT_ENTRY_ADD, rt);
411411 }
412412
413413 static int fib6_node_dump(struct fib6_walker *w)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t