Lines Matching refs:sitn
105 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_tunnel_lookup() local
108 for_each_ip_tunnel_rcu(t, sitn->tunnels_r_l[h0 ^ h1]) { in ipip6_tunnel_lookup()
116 for_each_ip_tunnel_rcu(t, sitn->tunnels_r[h0]) { in ipip6_tunnel_lookup()
123 for_each_ip_tunnel_rcu(t, sitn->tunnels_l[h1]) { in ipip6_tunnel_lookup()
130 t = rcu_dereference(sitn->tunnels_wc[0]); in ipip6_tunnel_lookup()
137 __ipip6_bucket(struct sit_net *sitn, struct ip_tunnel_parm_kern *parms) in __ipip6_bucket() argument
152 return &sitn->tunnels[prio][h]; in __ipip6_bucket()
155 static inline struct ip_tunnel __rcu **ipip6_bucket(struct sit_net *sitn, in ipip6_bucket() argument
158 return __ipip6_bucket(sitn, &t->parms); in ipip6_bucket()
161 static void ipip6_tunnel_unlink(struct sit_net *sitn, struct ip_tunnel *t) in ipip6_tunnel_unlink() argument
166 for (tp = ipip6_bucket(sitn, t); in ipip6_tunnel_unlink()
176 static void ipip6_tunnel_link(struct sit_net *sitn, struct ip_tunnel *t) in ipip6_tunnel_link() argument
178 struct ip_tunnel __rcu **tp = ipip6_bucket(sitn, t); in ipip6_tunnel_link()
184 static void ipip6_tunnel_clone_6rd(struct net_device *dev, struct sit_net *sitn) in ipip6_tunnel_clone_6rd() argument
189 if (dev == sitn->fb_tunnel_dev || !sitn->fb_tunnel_dev) { in ipip6_tunnel_clone_6rd()
195 struct ip_tunnel *t0 = netdev_priv(sitn->fb_tunnel_dev); in ipip6_tunnel_clone_6rd()
205 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_tunnel_create() local
220 ipip6_tunnel_clone_6rd(dev, sitn); in ipip6_tunnel_create()
222 ipip6_tunnel_link(sitn, t); in ipip6_tunnel_create()
239 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_tunnel_locate() local
241 for (tp = __ipip6_bucket(sitn, parms); in ipip6_tunnel_locate()
515 struct sit_net *sitn = net_generic(tunnel->net, sit_net_id); in ipip6_tunnel_uninit() local
517 if (dev == sitn->fb_tunnel_dev) { in ipip6_tunnel_uninit()
518 RCU_INIT_POINTER(sitn->tunnels_wc[0], NULL); in ipip6_tunnel_uninit()
520 ipip6_tunnel_unlink(sitn, tunnel); in ipip6_tunnel_uninit()
1145 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_tunnel_update() local
1147 ipip6_tunnel_unlink(sitn, t); in ipip6_tunnel_update()
1153 ipip6_tunnel_link(sitn, t); in ipip6_tunnel_update()
1471 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_fb_tunnel_init() local
1478 rcu_assign_pointer(sitn->tunnels_wc[0], tunnel); in ipip6_fb_tunnel_init()
1609 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_changelink() local
1616 if (dev == sitn->fb_tunnel_dev) in ipip6_changelink()
1762 struct sit_net *sitn = net_generic(net, sit_net_id); in ipip6_dellink() local
1764 if (dev != sitn->fb_tunnel_dev) in ipip6_dellink()
1806 struct sit_net *sitn = net_generic(net, sit_net_id); in sit_destroy_tunnels() local
1819 t = rtnl_dereference(sitn->tunnels[prio][h]); in sit_destroy_tunnels()
1835 struct sit_net *sitn = net_generic(net, sit_net_id); in sit_init_net() local
1839 sitn->tunnels[0] = sitn->tunnels_wc; in sit_init_net()
1840 sitn->tunnels[1] = sitn->tunnels_l; in sit_init_net()
1841 sitn->tunnels[2] = sitn->tunnels_r; in sit_init_net()
1842 sitn->tunnels[3] = sitn->tunnels_r_l; in sit_init_net()
1847 sitn->fb_tunnel_dev = alloc_netdev(sizeof(struct ip_tunnel), "sit0", in sit_init_net()
1850 if (!sitn->fb_tunnel_dev) { in sit_init_net()
1854 dev_net_set(sitn->fb_tunnel_dev, net); in sit_init_net()
1855 sitn->fb_tunnel_dev->rtnl_link_ops = &sit_link_ops; in sit_init_net()
1859 sitn->fb_tunnel_dev->netns_local = true; in sit_init_net()
1861 err = register_netdev(sitn->fb_tunnel_dev); in sit_init_net()
1865 ipip6_tunnel_clone_6rd(sitn->fb_tunnel_dev, sitn); in sit_init_net()
1866 ipip6_fb_tunnel_init(sitn->fb_tunnel_dev); in sit_init_net()
1868 t = netdev_priv(sitn->fb_tunnel_dev); in sit_init_net()
1870 strcpy(t->parms.name, sitn->fb_tunnel_dev->name); in sit_init_net()
1874 free_netdev(sitn->fb_tunnel_dev); in sit_init_net()