Lines Matching refs:ip6n
94 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_tnl_lookup() local
97 for_each_vti6_tunnel_rcu(ip6n->tnls_r_l[hash]) { in vti6_tnl_lookup()
106 for_each_vti6_tunnel_rcu(ip6n->tnls_r_l[hash]) { in vti6_tnl_lookup()
113 for_each_vti6_tunnel_rcu(ip6n->tnls_r_l[hash]) { in vti6_tnl_lookup()
119 t = rcu_dereference(ip6n->tnls_wc[0]); in vti6_tnl_lookup()
138 vti6_tnl_bucket(struct vti6_net *ip6n, const struct __ip6_tnl_parm *p) in vti6_tnl_bucket() argument
149 return &ip6n->tnls[prio][h]; in vti6_tnl_bucket()
153 vti6_tnl_link(struct vti6_net *ip6n, struct ip6_tnl *t) in vti6_tnl_link() argument
155 struct ip6_tnl __rcu **tp = vti6_tnl_bucket(ip6n, &t->parms); in vti6_tnl_link()
162 vti6_tnl_unlink(struct vti6_net *ip6n, struct ip6_tnl *t) in vti6_tnl_unlink() argument
167 for (tp = vti6_tnl_bucket(ip6n, &t->parms); in vti6_tnl_unlink()
186 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_tnl_create2() local
196 vti6_tnl_link(ip6n, t); in vti6_tnl_create2()
262 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_locate() local
264 for (tp = vti6_tnl_bucket(ip6n, p); in vti6_locate()
290 struct vti6_net *ip6n = net_generic(t->net, vti6_net_id); in vti6_dev_uninit() local
292 if (dev == ip6n->fb_tnl_dev) in vti6_dev_uninit()
293 RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL); in vti6_dev_uninit()
295 vti6_tnl_unlink(ip6n, t); in vti6_dev_uninit()
732 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_update() local
735 vti6_tnl_unlink(ip6n, t); in vti6_update()
738 vti6_tnl_link(ip6n, t); in vti6_update()
809 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_siocdevprivate() local
815 if (dev == ip6n->fb_tnl_dev) { in vti6_siocdevprivate()
844 if (dev != ip6n->fb_tnl_dev && cmd == SIOCCHGTUNNEL) { in vti6_siocdevprivate()
869 if (dev == ip6n->fb_tnl_dev) { in vti6_siocdevprivate()
879 if (t->dev == ip6n->fb_tnl_dev) in vti6_siocdevprivate()
968 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_fb_tnl_dev_init() local
972 rcu_assign_pointer(ip6n->tnls_wc[0], t); in vti6_fb_tnl_dev_init()
1030 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_dellink() local
1032 if (dev != ip6n->fb_tnl_dev) in vti6_dellink()
1043 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_changelink() local
1045 if (dev == ip6n->fb_tnl_dev) in vti6_changelink()
1121 static void __net_exit vti6_destroy_tunnels(struct vti6_net *ip6n, in vti6_destroy_tunnels() argument
1128 t = rtnl_dereference(ip6n->tnls_r_l[h]); in vti6_destroy_tunnels()
1135 t = rtnl_dereference(ip6n->tnls_wc[0]); in vti6_destroy_tunnels()
1142 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_init_net() local
1146 ip6n->tnls[0] = ip6n->tnls_wc; in vti6_init_net()
1147 ip6n->tnls[1] = ip6n->tnls_r_l; in vti6_init_net()
1152 ip6n->fb_tnl_dev = alloc_netdev(sizeof(struct ip6_tnl), "ip6_vti0", in vti6_init_net()
1155 if (!ip6n->fb_tnl_dev) in vti6_init_net()
1157 dev_net_set(ip6n->fb_tnl_dev, net); in vti6_init_net()
1158 ip6n->fb_tnl_dev->rtnl_link_ops = &vti6_link_ops; in vti6_init_net()
1160 err = vti6_fb_tnl_dev_init(ip6n->fb_tnl_dev); in vti6_init_net()
1164 err = register_netdev(ip6n->fb_tnl_dev); in vti6_init_net()
1168 t = netdev_priv(ip6n->fb_tnl_dev); in vti6_init_net()
1170 strcpy(t->parms.name, ip6n->fb_tnl_dev->name); in vti6_init_net()
1174 free_netdev(ip6n->fb_tnl_dev); in vti6_init_net()
1181 struct vti6_net *ip6n; in vti6_exit_batch_net() local
1187 ip6n = net_generic(net, vti6_net_id); in vti6_exit_batch_net()
1188 vti6_destroy_tunnels(ip6n, &list); in vti6_exit_batch_net()