Lines Matching refs:ip6n
98 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_tnl_lookup() local
101 for_each_vti6_tunnel_rcu(ip6n->tnls_r_l[hash]) { in vti6_tnl_lookup()
110 for_each_vti6_tunnel_rcu(ip6n->tnls_r_l[hash]) { in vti6_tnl_lookup()
117 for_each_vti6_tunnel_rcu(ip6n->tnls_r_l[hash]) { in vti6_tnl_lookup()
123 t = rcu_dereference(ip6n->tnls_wc[0]); in vti6_tnl_lookup()
141 vti6_tnl_bucket(struct vti6_net *ip6n, const struct __ip6_tnl_parm *p) in vti6_tnl_bucket() argument
152 return &ip6n->tnls[prio][h]; in vti6_tnl_bucket()
156 vti6_tnl_link(struct vti6_net *ip6n, struct ip6_tnl *t) in vti6_tnl_link() argument
158 struct ip6_tnl __rcu **tp = vti6_tnl_bucket(ip6n, &t->parms); in vti6_tnl_link()
165 vti6_tnl_unlink(struct vti6_net *ip6n, struct ip6_tnl *t) in vti6_tnl_unlink() argument
170 for (tp = vti6_tnl_bucket(ip6n, &t->parms); in vti6_tnl_unlink()
189 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_tnl_create2() local
200 vti6_tnl_link(ip6n, t); in vti6_tnl_create2()
266 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_locate() local
268 for (tp = vti6_tnl_bucket(ip6n, p); in vti6_locate()
294 struct vti6_net *ip6n = net_generic(t->net, vti6_net_id); in vti6_dev_uninit() local
296 if (dev == ip6n->fb_tnl_dev) in vti6_dev_uninit()
297 RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL); in vti6_dev_uninit()
299 vti6_tnl_unlink(ip6n, t); in vti6_dev_uninit()
701 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_update() local
704 vti6_tnl_unlink(ip6n, t); in vti6_update()
707 vti6_tnl_link(ip6n, t); in vti6_update()
777 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_ioctl() local
781 if (dev == ip6n->fb_tnl_dev) { in vti6_ioctl()
810 if (dev != ip6n->fb_tnl_dev && cmd == SIOCCHGTUNNEL) { in vti6_ioctl()
835 if (dev == ip6n->fb_tnl_dev) { in vti6_ioctl()
845 if (t->dev == ip6n->fb_tnl_dev) in vti6_ioctl()
934 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_fb_tnl_dev_init() local
939 rcu_assign_pointer(ip6n->tnls_wc[0], t); in vti6_fb_tnl_dev_init()
997 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_dellink() local
999 if (dev != ip6n->fb_tnl_dev) in vti6_dellink()
1010 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_changelink() local
1012 if (dev == ip6n->fb_tnl_dev) in vti6_changelink()
1088 static void __net_exit vti6_destroy_tunnels(struct vti6_net *ip6n) in vti6_destroy_tunnels() argument
1095 t = rtnl_dereference(ip6n->tnls_r_l[h]); in vti6_destroy_tunnels()
1102 t = rtnl_dereference(ip6n->tnls_wc[0]); in vti6_destroy_tunnels()
1109 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_init_net() local
1113 ip6n->tnls[0] = ip6n->tnls_wc; in vti6_init_net()
1114 ip6n->tnls[1] = ip6n->tnls_r_l; in vti6_init_net()
1117 ip6n->fb_tnl_dev = alloc_netdev(sizeof(struct ip6_tnl), "ip6_vti0", in vti6_init_net()
1120 if (!ip6n->fb_tnl_dev) in vti6_init_net()
1122 dev_net_set(ip6n->fb_tnl_dev, net); in vti6_init_net()
1123 ip6n->fb_tnl_dev->rtnl_link_ops = &vti6_link_ops; in vti6_init_net()
1125 err = vti6_fb_tnl_dev_init(ip6n->fb_tnl_dev); in vti6_init_net()
1129 err = register_netdev(ip6n->fb_tnl_dev); in vti6_init_net()
1133 t = netdev_priv(ip6n->fb_tnl_dev); in vti6_init_net()
1135 strcpy(t->parms.name, ip6n->fb_tnl_dev->name); in vti6_init_net()
1139 free_netdev(ip6n->fb_tnl_dev); in vti6_init_net()
1146 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_exit_net() local
1149 vti6_destroy_tunnels(ip6n); in vti6_exit_net()