Lines Matching refs:sitn
104 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_tunnel_lookup() local
107 for_each_ip_tunnel_rcu(t, sitn->tunnels_r_l[h0 ^ h1]) { in ipip6_tunnel_lookup()
115 for_each_ip_tunnel_rcu(t, sitn->tunnels_r[h0]) { in ipip6_tunnel_lookup()
122 for_each_ip_tunnel_rcu(t, sitn->tunnels_l[h1]) { in ipip6_tunnel_lookup()
129 t = rcu_dereference(sitn->tunnels_wc[0]); in ipip6_tunnel_lookup()
135 static struct ip_tunnel __rcu **__ipip6_bucket(struct sit_net *sitn, in __ipip6_bucket() argument
151 return &sitn->tunnels[prio][h]; in __ipip6_bucket()
154 static inline struct ip_tunnel __rcu **ipip6_bucket(struct sit_net *sitn, in ipip6_bucket() argument
157 return __ipip6_bucket(sitn, &t->parms); in ipip6_bucket()
160 static void ipip6_tunnel_unlink(struct sit_net *sitn, struct ip_tunnel *t) in ipip6_tunnel_unlink() argument
165 for (tp = ipip6_bucket(sitn, t); in ipip6_tunnel_unlink()
175 static void ipip6_tunnel_link(struct sit_net *sitn, struct ip_tunnel *t) in ipip6_tunnel_link() argument
177 struct ip_tunnel __rcu **tp = ipip6_bucket(sitn, t); in ipip6_tunnel_link()
183 static void ipip6_tunnel_clone_6rd(struct net_device *dev, struct sit_net *sitn) in ipip6_tunnel_clone_6rd() argument
188 if (dev == sitn->fb_tunnel_dev || !sitn->fb_tunnel_dev) { in ipip6_tunnel_clone_6rd()
194 struct ip_tunnel *t0 = netdev_priv(sitn->fb_tunnel_dev); in ipip6_tunnel_clone_6rd()
204 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_tunnel_create() local
219 ipip6_tunnel_clone_6rd(dev, sitn); in ipip6_tunnel_create()
221 ipip6_tunnel_link(sitn, t); in ipip6_tunnel_create()
237 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_tunnel_locate() local
239 for (tp = __ipip6_bucket(sitn, parms); in ipip6_tunnel_locate()
513 struct sit_net *sitn = net_generic(tunnel->net, sit_net_id); in ipip6_tunnel_uninit() local
515 if (dev == sitn->fb_tunnel_dev) { in ipip6_tunnel_uninit()
516 RCU_INIT_POINTER(sitn->tunnels_wc[0], NULL); in ipip6_tunnel_uninit()
518 ipip6_tunnel_unlink(sitn, tunnel); in ipip6_tunnel_uninit()
1140 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_tunnel_update() local
1142 ipip6_tunnel_unlink(sitn, t); in ipip6_tunnel_update()
1148 ipip6_tunnel_link(sitn, t); in ipip6_tunnel_update()
1469 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_fb_tunnel_init() local
1476 rcu_assign_pointer(sitn->tunnels_wc[0], tunnel); in ipip6_fb_tunnel_init()
1607 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_changelink() local
1614 if (dev == sitn->fb_tunnel_dev) in ipip6_changelink()
1759 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_dellink() local
1761 if (dev != sitn->fb_tunnel_dev) in ipip6_dellink()
1803 struct sit_net *sitn = net_generic(net, sit_net_id); in sit_destroy_tunnels() local
1816 t = rtnl_dereference(sitn->tunnels[prio][h]); in sit_destroy_tunnels()
1832 struct sit_net *sitn = net_generic(net, sit_net_id); in sit_init_net() local
1836 sitn->tunnels[0] = sitn->tunnels_wc; in sit_init_net()
1837 sitn->tunnels[1] = sitn->tunnels_l; in sit_init_net()
1838 sitn->tunnels[2] = sitn->tunnels_r; in sit_init_net()
1839 sitn->tunnels[3] = sitn->tunnels_r_l; in sit_init_net()
1844 sitn->fb_tunnel_dev = alloc_netdev(sizeof(struct ip_tunnel), "sit0", in sit_init_net()
1847 if (!sitn->fb_tunnel_dev) { in sit_init_net()
1851 dev_net_set(sitn->fb_tunnel_dev, net); in sit_init_net()
1852 sitn->fb_tunnel_dev->rtnl_link_ops = &sit_link_ops; in sit_init_net()
1856 sitn->fb_tunnel_dev->features |= NETIF_F_NETNS_LOCAL; in sit_init_net()
1858 err = register_netdev(sitn->fb_tunnel_dev); in sit_init_net()
1862 ipip6_tunnel_clone_6rd(sitn->fb_tunnel_dev, sitn); in sit_init_net()
1863 ipip6_fb_tunnel_init(sitn->fb_tunnel_dev); in sit_init_net()
1865 t = netdev_priv(sitn->fb_tunnel_dev); in sit_init_net()
1867 strcpy(t->parms.name, sitn->fb_tunnel_dev->name); in sit_init_net()
1871 free_netdev(sitn->fb_tunnel_dev); in sit_init_net()