aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_rules.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-01-20 19:46:41 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:08:13 -0500
commit9e3a548781fc1c0da617fc65769a515f074be740 (patch)
treefee75c4308276a37e6f1c0f55335332463bb3e7e /net/ipv4/fib_rules.c
parent035923833369e4da5d3c4ad0700bc7c367a0fa37 (diff)
[NETNS]: FIB rules API cleanup.
Remove struct net from fib_rules_register(unregister)/notify_change paths and diet code size a bit. add/remove: 0/0 grow/shrink: 10/12 up/down: 35/-100 (-65) function old new delta notify_rule_change 273 280 +7 trie_show_stats 471 475 +4 fn_trie_delete 473 477 +4 fib_rules_unregister 144 148 +4 fib4_rule_compare 119 123 +4 resize 2842 2845 +3 fn_trie_select_default 515 518 +3 inet_sk_rebuild_header 836 838 +2 fib_trie_seq_show 764 766 +2 __devinet_sysctl_register 276 278 +2 fn_trie_lookup 1124 1123 -1 ip_fib_check_default 133 131 -2 devinet_conf_sysctl 223 221 -2 snmp_fold_field 126 123 -3 fn_trie_insert 2091 2086 -5 inet_create 876 870 -6 fib4_rules_init 197 191 -6 fib_sync_down 452 444 -8 inet_gso_send_check 334 325 -9 fib_create_info 3003 2991 -12 fib_nl_delrule 568 553 -15 fib_nl_newrule 883 852 -31 Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_rules.c')
-rw-r--r--net/ipv4/fib_rules.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index 8d0ebe7f360d..3b7affd5cb3b 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -317,7 +317,7 @@ int __net_init fib4_rules_init(struct net *net)
317 INIT_LIST_HEAD(&ops->rules_list); 317 INIT_LIST_HEAD(&ops->rules_list);
318 ops->fro_net = net; 318 ops->fro_net = net;
319 319
320 fib_rules_register(net, ops); 320 fib_rules_register(ops);
321 321
322 err = fib_default_rules_init(ops); 322 err = fib_default_rules_init(ops);
323 if (err < 0) 323 if (err < 0)
@@ -327,13 +327,13 @@ int __net_init fib4_rules_init(struct net *net)
327 327
328fail: 328fail:
329 /* also cleans all rules already added */ 329 /* also cleans all rules already added */
330 fib_rules_unregister(net, ops); 330 fib_rules_unregister(ops);
331 kfree(ops); 331 kfree(ops);
332 return err; 332 return err;
333} 333}
334 334
335void __net_exit fib4_rules_exit(struct net *net) 335void __net_exit fib4_rules_exit(struct net *net)
336{ 336{
337 fib_rules_unregister(net, net->ipv4.rules_ops); 337 fib_rules_unregister(net->ipv4.rules_ops);
338 kfree(net->ipv4.rules_ops); 338 kfree(net->ipv4.rules_ops);
339} 339}