Lines Matching refs:ipv6
75 list_for_each_entry(w, &(net)->ipv6.fib6_walkers, lh)
79 write_lock_bh(&net->ipv6.fib6_walker_lock); in fib6_walker_link()
80 list_add(&w->lh, &net->ipv6.fib6_walkers); in fib6_walker_link()
81 write_unlock_bh(&net->ipv6.fib6_walker_lock); in fib6_walker_link()
86 write_lock_bh(&net->ipv6.fib6_walker_lock); in fib6_walker_unlink()
88 write_unlock_bh(&net->ipv6.fib6_walker_lock); in fib6_walker_unlink()
96 old = atomic_read(&net->ipv6.fib6_sernum); in fib6_new_sernum()
98 } while (atomic_cmpxchg(&net->ipv6.fib6_sernum, in fib6_new_sernum()
188 net->ipv6.rt6_stats->fib_nodes++; in node_alloc()
196 net->ipv6.rt6_stats->fib_nodes--; in node_free_immediate()
209 net->ipv6.rt6_stats->fib_nodes--; in node_free()
233 hlist_add_head_rcu(&tb->tb6_hlist, &net->ipv6.fib_table_hash[h]); in fib6_link_table()
246 net->ipv6.fib6_null_entry); in fib6_alloc_table()
282 head = &net->ipv6.fib_table_hash[h]; in fib6_get_table()
297 fib6_link_table(net, net->ipv6.fib6_main_tbl); in fib6_tables_init()
298 fib6_link_table(net, net->ipv6.fib6_local_tbl); in fib6_tables_init()
309 return net->ipv6.fib6_main_tbl; in fib6_get_table()
319 net, net->ipv6.fib6_main_tbl, fl6, skb, flags); in fib6_rule_lookup()
322 rt = net->ipv6.ip6_null_entry; in fib6_rule_lookup()
334 return fib6_table_lookup(net, net->ipv6.fib6_main_tbl, oif, fl6, in fib6_lookup()
340 fib6_link_table(net, net->ipv6.fib6_main_tbl); in fib6_tables_init()
351 struct hlist_head *head = &net->ipv6.fib_table_hash[h]; in fib6_tables_seq_read()
442 if (!rt || rt == arg->net->ipv6.fib6_null_entry) in fib6_rt_dump()
498 struct hlist_head *head = &net->ipv6.fib_table_hash[h]; in fib6_tables_dump()
692 head = &net->ipv6.fib_table_hash[h]; in inet6_dump_fib()
794 net->ipv6.fib6_null_entry) { in fib6_add_1()
1252 info->nl_net->ipv6.rt6_stats->fib_rt_entries++; in fib6_add_rt2node()
1255 info->nl_net->ipv6.rt6_stats->fib_route_nodes++; in fib6_add_rt2node()
1284 info->nl_net->ipv6.rt6_stats->fib_route_nodes++; in fib6_add_rt2node()
1310 info->nl_net->ipv6.rt6_stats->fib_rt_entries--; in fib6_add_rt2node()
1326 if (!timer_pending(&net->ipv6.ip6_fib_timer) && in fib6_start_gc()
1328 mod_timer(&net->ipv6.ip6_fib_timer, in fib6_start_gc()
1329 jiffies + net->ipv6.sysctl.ip6_rt_gc_interval); in fib6_start_gc()
1334 if (!timer_pending(&net->ipv6.ip6_fib_timer)) in fib6_force_start_gc()
1335 mod_timer(&net->ipv6.ip6_fib_timer, in fib6_force_start_gc()
1336 jiffies + net->ipv6.sysctl.ip6_rt_gc_interval); in fib6_force_start_gc()
1426 fib6_info_hold(info->nl_net->ipv6.fib6_null_entry); in fib6_add()
1428 info->nl_net->ipv6.fib6_null_entry); in fib6_add()
1467 info->nl_net->ipv6.fib6_null_entry); in fib6_add()
1506 info->nl_net->ipv6.fib6_null_entry; in fib6_add()
1748 return net->ipv6.fib6_null_entry; in fib6_find_prefix()
1785 rcu_assign_pointer(fn->leaf, net->ipv6.fib6_null_entry); in fib6_repair_tree()
1834 new_fn_leaf = net->ipv6.fib6_null_entry; in fib6_repair_tree()
1865 read_lock(&net->ipv6.fib6_walker_lock); in fib6_repair_tree()
1886 read_unlock(&net->ipv6.fib6_walker_lock); in fib6_repair_tree()
1927 net->ipv6.rt6_stats->fib_rt_entries--; in fib6_del_route()
1928 net->ipv6.rt6_stats->fib_discarded_routes++; in fib6_del_route()
1955 read_lock(&net->ipv6.fib6_walker_lock); in fib6_del_route()
1965 read_unlock(&net->ipv6.fib6_walker_lock); in fib6_del_route()
1974 net->ipv6.rt6_stats->fib_route_nodes--; in fib6_del_route()
2003 if (rt == net->ipv6.fib6_null_entry) in fib6_del()
2249 head = &net->ipv6.fib_table_hash[h]; in __fib6_clean_all()
2317 spin_lock_bh(&net->ipv6.fib6_gc_lock); in fib6_run_gc()
2318 } else if (!spin_trylock_bh(&net->ipv6.fib6_gc_lock)) { in fib6_run_gc()
2319 mod_timer(&net->ipv6.ip6_fib_timer, jiffies + HZ); in fib6_run_gc()
2323 net->ipv6.sysctl.ip6_rt_gc_interval; in fib6_run_gc()
2328 net->ipv6.ip6_rt_last_gc = now; in fib6_run_gc()
2331 mod_timer(&net->ipv6.ip6_fib_timer, in fib6_run_gc()
2333 + net->ipv6.sysctl.ip6_rt_gc_interval)); in fib6_run_gc()
2335 del_timer(&net->ipv6.ip6_fib_timer); in fib6_run_gc()
2336 spin_unlock_bh(&net->ipv6.fib6_gc_lock); in fib6_run_gc()
2341 struct net *arg = from_timer(arg, t, ipv6.ip6_fib_timer); in fib6_gc_timer_cb()
2356 net->ipv6.sysctl.multipath_hash_fields = in fib6_net_init()
2359 spin_lock_init(&net->ipv6.fib6_gc_lock); in fib6_net_init()
2360 rwlock_init(&net->ipv6.fib6_walker_lock); in fib6_net_init()
2361 INIT_LIST_HEAD(&net->ipv6.fib6_walkers); in fib6_net_init()
2362 timer_setup(&net->ipv6.ip6_fib_timer, fib6_gc_timer_cb, 0); in fib6_net_init()
2364 net->ipv6.rt6_stats = kzalloc(sizeof(*net->ipv6.rt6_stats), GFP_KERNEL); in fib6_net_init()
2365 if (!net->ipv6.rt6_stats) in fib6_net_init()
2371 net->ipv6.fib_table_hash = kzalloc(size, GFP_KERNEL); in fib6_net_init()
2372 if (!net->ipv6.fib_table_hash) in fib6_net_init()
2375 net->ipv6.fib6_main_tbl = kzalloc(sizeof(*net->ipv6.fib6_main_tbl), in fib6_net_init()
2377 if (!net->ipv6.fib6_main_tbl) in fib6_net_init()
2380 net->ipv6.fib6_main_tbl->tb6_id = RT6_TABLE_MAIN; in fib6_net_init()
2381 rcu_assign_pointer(net->ipv6.fib6_main_tbl->tb6_root.leaf, in fib6_net_init()
2382 net->ipv6.fib6_null_entry); in fib6_net_init()
2383 net->ipv6.fib6_main_tbl->tb6_root.fn_flags = in fib6_net_init()
2385 inet_peer_base_init(&net->ipv6.fib6_main_tbl->tb6_peers); in fib6_net_init()
2388 net->ipv6.fib6_local_tbl = kzalloc(sizeof(*net->ipv6.fib6_local_tbl), in fib6_net_init()
2390 if (!net->ipv6.fib6_local_tbl) in fib6_net_init()
2392 net->ipv6.fib6_local_tbl->tb6_id = RT6_TABLE_LOCAL; in fib6_net_init()
2393 rcu_assign_pointer(net->ipv6.fib6_local_tbl->tb6_root.leaf, in fib6_net_init()
2394 net->ipv6.fib6_null_entry); in fib6_net_init()
2395 net->ipv6.fib6_local_tbl->tb6_root.fn_flags = in fib6_net_init()
2397 inet_peer_base_init(&net->ipv6.fib6_local_tbl->tb6_peers); in fib6_net_init()
2405 kfree(net->ipv6.fib6_main_tbl); in fib6_net_init()
2408 kfree(net->ipv6.fib_table_hash); in fib6_net_init()
2410 kfree(net->ipv6.rt6_stats); in fib6_net_init()
2420 del_timer_sync(&net->ipv6.ip6_fib_timer); in fib6_net_exit()
2423 struct hlist_head *head = &net->ipv6.fib_table_hash[i]; in fib6_net_exit()
2433 kfree(net->ipv6.fib_table_hash); in fib6_net_exit()
2434 kfree(net->ipv6.rt6_stats); in fib6_net_exit()
2563 hlist_first_rcu(&net->ipv6.fib_table_hash[h++])); in ipv6_route_seq_next_table()