Lines Matching refs:ipv6

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);
81 list_add(&w->lh, &net->ipv6.fib6_walkers);
82 write_unlock_bh(&net->ipv6.fib6_walker_lock);
87 write_lock_bh(&net->ipv6.fib6_walker_lock);
89 write_unlock_bh(&net->ipv6.fib6_walker_lock);
94 int new, old = atomic_read(&net->ipv6.fib6_sernum);
98 } while (!atomic_try_cmpxchg(&net->ipv6.fib6_sernum, &old, new));
188 net->ipv6.rt6_stats->fib_nodes++;
196 net->ipv6.rt6_stats->fib_nodes--;
209 net->ipv6.rt6_stats->fib_nodes--;
233 hlist_add_head_rcu(&tb->tb6_hlist, &net->ipv6.fib_table_hash[h]);
246 net->ipv6.fib6_null_entry);
282 head = &net->ipv6.fib_table_hash[h];
297 fib6_link_table(net, net->ipv6.fib6_main_tbl);
298 fib6_link_table(net, net->ipv6.fib6_local_tbl);
309 return net->ipv6.fib6_main_tbl;
319 net, net->ipv6.fib6_main_tbl, fl6, skb, flags);
322 rt = net->ipv6.ip6_null_entry;
334 return fib6_table_lookup(net, net->ipv6.fib6_main_tbl, oif, fl6,
340 fib6_link_table(net, net->ipv6.fib6_main_tbl);
351 struct hlist_head *head = &net->ipv6.fib_table_hash[h];
442 if (!rt || rt == arg->net->ipv6.fib6_null_entry)
498 struct hlist_head *head = &net->ipv6.fib_table_hash[h];
692 head = &net->ipv6.fib_table_hash[h];
794 net->ipv6.fib6_null_entry) {
1252 info->nl_net->ipv6.rt6_stats->fib_rt_entries++;
1255 info->nl_net->ipv6.rt6_stats->fib_route_nodes++;
1284 info->nl_net->ipv6.rt6_stats->fib_route_nodes++;
1310 info->nl_net->ipv6.rt6_stats->fib_rt_entries--;
1326 if (!timer_pending(&net->ipv6.ip6_fib_timer) &&
1328 mod_timer(&net->ipv6.ip6_fib_timer,
1329 jiffies + net->ipv6.sysctl.ip6_rt_gc_interval);
1334 if (!timer_pending(&net->ipv6.ip6_fib_timer))
1335 mod_timer(&net->ipv6.ip6_fib_timer,
1336 jiffies + net->ipv6.sysctl.ip6_rt_gc_interval);
1426 fib6_info_hold(info->nl_net->ipv6.fib6_null_entry);
1428 info->nl_net->ipv6.fib6_null_entry);
1467 info->nl_net->ipv6.fib6_null_entry);
1506 info->nl_net->ipv6.fib6_null_entry;
1748 return net->ipv6.fib6_null_entry;
1785 rcu_assign_pointer(fn->leaf, net->ipv6.fib6_null_entry);
1834 new_fn_leaf = net->ipv6.fib6_null_entry;
1865 read_lock(&net->ipv6.fib6_walker_lock);
1886 read_unlock(&net->ipv6.fib6_walker_lock);
1927 net->ipv6.rt6_stats->fib_rt_entries--;
1928 net->ipv6.rt6_stats->fib_discarded_routes++;
1955 read_lock(&net->ipv6.fib6_walker_lock);
1965 read_unlock(&net->ipv6.fib6_walker_lock);
1974 net->ipv6.rt6_stats->fib_route_nodes--;
2003 if (rt == net->ipv6.fib6_null_entry)
2249 head = &net->ipv6.fib_table_hash[h];
2317 spin_lock_bh(&net->ipv6.fib6_gc_lock);
2318 } else if (!spin_trylock_bh(&net->ipv6.fib6_gc_lock)) {
2319 mod_timer(&net->ipv6.ip6_fib_timer, jiffies + HZ);
2323 net->ipv6.sysctl.ip6_rt_gc_interval;
2328 net->ipv6.ip6_rt_last_gc = now;
2331 mod_timer(&net->ipv6.ip6_fib_timer,
2333 + net->ipv6.sysctl.ip6_rt_gc_interval));
2335 del_timer(&net->ipv6.ip6_fib_timer);
2336 spin_unlock_bh(&net->ipv6.fib6_gc_lock);
2341 struct net *arg = from_timer(arg, t, ipv6.ip6_fib_timer);
2356 net->ipv6.sysctl.multipath_hash_fields =
2359 spin_lock_init(&net->ipv6.fib6_gc_lock);
2360 rwlock_init(&net->ipv6.fib6_walker_lock);
2361 INIT_LIST_HEAD(&net->ipv6.fib6_walkers);
2362 timer_setup(&net->ipv6.ip6_fib_timer, fib6_gc_timer_cb, 0);
2364 net->ipv6.rt6_stats = kzalloc(sizeof(*net->ipv6.rt6_stats), GFP_KERNEL);
2365 if (!net->ipv6.rt6_stats)
2371 net->ipv6.fib_table_hash = kzalloc(size, GFP_KERNEL);
2372 if (!net->ipv6.fib_table_hash)
2375 net->ipv6.fib6_main_tbl = kzalloc(sizeof(*net->ipv6.fib6_main_tbl),
2377 if (!net->ipv6.fib6_main_tbl)
2380 net->ipv6.fib6_main_tbl->tb6_id = RT6_TABLE_MAIN;
2381 rcu_assign_pointer(net->ipv6.fib6_main_tbl->tb6_root.leaf,
2382 net->ipv6.fib6_null_entry);
2383 net->ipv6.fib6_main_tbl->tb6_root.fn_flags =
2385 inet_peer_base_init(&net->ipv6.fib6_main_tbl->tb6_peers);
2388 net->ipv6.fib6_local_tbl = kzalloc(sizeof(*net->ipv6.fib6_local_tbl),
2390 if (!net->ipv6.fib6_local_tbl)
2392 net->ipv6.fib6_local_tbl->tb6_id = RT6_TABLE_LOCAL;
2393 rcu_assign_pointer(net->ipv6.fib6_local_tbl->tb6_root.leaf,
2394 net->ipv6.fib6_null_entry);
2395 net->ipv6.fib6_local_tbl->tb6_root.fn_flags =
2397 inet_peer_base_init(&net->ipv6.fib6_local_tbl->tb6_peers);
2405 kfree(net->ipv6.fib6_main_tbl);
2408 kfree(net->ipv6.fib_table_hash);
2410 kfree(net->ipv6.rt6_stats);
2420 del_timer_sync(&net->ipv6.ip6_fib_timer);
2423 struct hlist_head *head = &net->ipv6.fib_table_hash[i];
2433 kfree(net->ipv6.fib_table_hash);
2434 kfree(net->ipv6.rt6_stats);
2563 hlist_first_rcu(&net->ipv6.fib_table_hash[h++]));