Lines Matching full:ipv6
16 #define pr_fmt(fmt) "IPv6: " fmt
30 #include <net/ipv6.h>
76 list_for_each_entry(w, &(net)->ipv6.fib6_walkers, lh)
80 write_lock_bh(&net->ipv6.fib6_walker_lock); in fib6_walker_link()
81 list_add(&w->lh, &net->ipv6.fib6_walkers); in fib6_walker_link()
82 write_unlock_bh(&net->ipv6.fib6_walker_lock); in fib6_walker_link()
87 write_lock_bh(&net->ipv6.fib6_walker_lock); in fib6_walker_unlink()
89 write_unlock_bh(&net->ipv6.fib6_walker_lock); in fib6_walker_unlink()
94 int new, old = atomic_read(&net->ipv6.fib6_sernum); in fib6_new_sernum()
98 } while (!atomic_try_cmpxchg(&net->ipv6.fib6_sernum, &old, new)); in fib6_new_sernum()
190 net->ipv6.rt6_stats->fib_nodes++; in node_alloc()
198 net->ipv6.rt6_stats->fib_nodes--; in node_free_immediate()
211 net->ipv6.rt6_stats->fib_nodes--; in node_free()
235 hlist_add_head_rcu(&tb->tb6_hlist, &net->ipv6.fib_table_hash[h]); in fib6_link_table()
248 net->ipv6.fib6_null_entry); in fib6_alloc_table()
285 head = &net->ipv6.fib_table_hash[h]; in fib6_get_table()
300 fib6_link_table(net, net->ipv6.fib6_main_tbl); in fib6_tables_init()
301 fib6_link_table(net, net->ipv6.fib6_local_tbl); in fib6_tables_init()
312 return net->ipv6.fib6_main_tbl; in fib6_get_table()
322 net, net->ipv6.fib6_main_tbl, fl6, skb, flags); in fib6_rule_lookup()
325 rt = net->ipv6.ip6_null_entry; in fib6_rule_lookup()
337 return fib6_table_lookup(net, net->ipv6.fib6_main_tbl, oif, fl6, in fib6_lookup()
343 fib6_link_table(net, net->ipv6.fib6_main_tbl); in fib6_tables_init()
354 struct hlist_head *head = &net->ipv6.fib_table_hash[h]; in fib6_tables_seq_read()
445 if (!rt || rt == arg->net->ipv6.fib6_null_entry) in fib6_rt_dump()
501 struct hlist_head *head = &net->ipv6.fib_table_hash[h]; in fib6_tables_dump()
699 head = &net->ipv6.fib_table_hash[h]; in inet6_dump_fib()
799 net->ipv6.fib6_null_entry) { in fib6_add_1()
828 * That would keep IPv6 consistent with IPv4 in fib6_add_1()
1267 info->nl_net->ipv6.rt6_stats->fib_rt_entries++; in fib6_add_rt2node()
1270 info->nl_net->ipv6.rt6_stats->fib_route_nodes++; in fib6_add_rt2node()
1299 info->nl_net->ipv6.rt6_stats->fib_route_nodes++; in fib6_add_rt2node()
1325 info->nl_net->ipv6.rt6_stats->fib_rt_entries--; in fib6_add_rt2node()
1341 if (!timer_pending(&net->ipv6.ip6_fib_timer) && in fib6_start_gc()
1343 mod_timer(&net->ipv6.ip6_fib_timer, in fib6_start_gc()
1344 jiffies + net->ipv6.sysctl.ip6_rt_gc_interval); in fib6_start_gc()
1349 if (!timer_pending(&net->ipv6.ip6_fib_timer)) in fib6_force_start_gc()
1350 mod_timer(&net->ipv6.ip6_fib_timer, in fib6_force_start_gc()
1351 jiffies + net->ipv6.sysctl.ip6_rt_gc_interval); in fib6_force_start_gc()
1444 fib6_info_hold(info->nl_net->ipv6.fib6_null_entry); in fib6_add()
1446 info->nl_net->ipv6.fib6_null_entry); in fib6_add()
1485 info->nl_net->ipv6.fib6_null_entry); in fib6_add()
1528 info->nl_net->ipv6.fib6_null_entry; in fib6_add()
1770 return net->ipv6.fib6_null_entry; in fib6_find_prefix()
1807 rcu_assign_pointer(fn->leaf, net->ipv6.fib6_null_entry); in fib6_repair_tree()
1856 new_fn_leaf = net->ipv6.fib6_null_entry; in fib6_repair_tree()
1887 read_lock(&net->ipv6.fib6_walker_lock); in fib6_repair_tree()
1911 read_unlock(&net->ipv6.fib6_walker_lock); in fib6_repair_tree()
1950 net->ipv6.rt6_stats->fib_rt_entries--; in fib6_del_route()
1951 net->ipv6.rt6_stats->fib_discarded_routes++; in fib6_del_route()
1978 read_lock(&net->ipv6.fib6_walker_lock); in fib6_del_route()
1988 read_unlock(&net->ipv6.fib6_walker_lock); in fib6_del_route()
1997 net->ipv6.rt6_stats->fib_route_nodes--; in fib6_del_route()
2026 if (rt == net->ipv6.fib6_null_entry) in fib6_del()
2272 head = &net->ipv6.fib_table_hash[h]; in __fib6_clean_all()
2357 head = &net->ipv6.fib_table_hash[h]; in fib6_gc_all()
2375 spin_lock_bh(&net->ipv6.fib6_gc_lock); in fib6_run_gc()
2376 } else if (!spin_trylock_bh(&net->ipv6.fib6_gc_lock)) { in fib6_run_gc()
2377 mod_timer(&net->ipv6.ip6_fib_timer, jiffies + HZ); in fib6_run_gc()
2381 net->ipv6.sysctl.ip6_rt_gc_interval; in fib6_run_gc()
2386 net->ipv6.ip6_rt_last_gc = now; in fib6_run_gc()
2389 mod_timer(&net->ipv6.ip6_fib_timer, in fib6_run_gc()
2391 + net->ipv6.sysctl.ip6_rt_gc_interval)); in fib6_run_gc()
2393 del_timer(&net->ipv6.ip6_fib_timer); in fib6_run_gc()
2394 spin_unlock_bh(&net->ipv6.fib6_gc_lock); in fib6_run_gc()
2399 struct net *arg = from_timer(arg, t, ipv6.ip6_fib_timer); in fib6_gc_timer_cb()
2414 net->ipv6.sysctl.multipath_hash_fields = in fib6_net_init()
2417 spin_lock_init(&net->ipv6.fib6_gc_lock); in fib6_net_init()
2418 rwlock_init(&net->ipv6.fib6_walker_lock); in fib6_net_init()
2419 INIT_LIST_HEAD(&net->ipv6.fib6_walkers); in fib6_net_init()
2420 timer_setup(&net->ipv6.ip6_fib_timer, fib6_gc_timer_cb, 0); in fib6_net_init()
2422 net->ipv6.rt6_stats = kzalloc(sizeof(*net->ipv6.rt6_stats), GFP_KERNEL); in fib6_net_init()
2423 if (!net->ipv6.rt6_stats) in fib6_net_init()
2429 net->ipv6.fib_table_hash = kzalloc(size, GFP_KERNEL); in fib6_net_init()
2430 if (!net->ipv6.fib_table_hash) in fib6_net_init()
2433 net->ipv6.fib6_main_tbl = kzalloc(sizeof(*net->ipv6.fib6_main_tbl), in fib6_net_init()
2435 if (!net->ipv6.fib6_main_tbl) in fib6_net_init()
2438 net->ipv6.fib6_main_tbl->tb6_id = RT6_TABLE_MAIN; in fib6_net_init()
2439 rcu_assign_pointer(net->ipv6.fib6_main_tbl->tb6_root.leaf, in fib6_net_init()
2440 net->ipv6.fib6_null_entry); in fib6_net_init()
2441 net->ipv6.fib6_main_tbl->tb6_root.fn_flags = in fib6_net_init()
2443 inet_peer_base_init(&net->ipv6.fib6_main_tbl->tb6_peers); in fib6_net_init()
2444 INIT_HLIST_HEAD(&net->ipv6.fib6_main_tbl->tb6_gc_hlist); in fib6_net_init()
2447 net->ipv6.fib6_local_tbl = kzalloc(sizeof(*net->ipv6.fib6_local_tbl), in fib6_net_init()
2449 if (!net->ipv6.fib6_local_tbl) in fib6_net_init()
2451 net->ipv6.fib6_local_tbl->tb6_id = RT6_TABLE_LOCAL; in fib6_net_init()
2452 rcu_assign_pointer(net->ipv6.fib6_local_tbl->tb6_root.leaf, in fib6_net_init()
2453 net->ipv6.fib6_null_entry); in fib6_net_init()
2454 net->ipv6.fib6_local_tbl->tb6_root.fn_flags = in fib6_net_init()
2456 inet_peer_base_init(&net->ipv6.fib6_local_tbl->tb6_peers); in fib6_net_init()
2457 INIT_HLIST_HEAD(&net->ipv6.fib6_local_tbl->tb6_gc_hlist); in fib6_net_init()
2465 kfree(net->ipv6.fib6_main_tbl); in fib6_net_init()
2468 kfree(net->ipv6.fib_table_hash); in fib6_net_init()
2470 kfree(net->ipv6.rt6_stats); in fib6_net_init()
2480 del_timer_sync(&net->ipv6.ip6_fib_timer); in fib6_net_exit()
2483 struct hlist_head *head = &net->ipv6.fib_table_hash[i]; in fib6_net_exit()
2493 kfree(net->ipv6.fib_table_hash); in fib6_net_exit()
2494 kfree(net->ipv6.rt6_stats); in fib6_net_exit()
2622 hlist_first_rcu(&net->ipv6.fib_table_hash[h++])); in ipv6_route_seq_next_table()