Searched refs:x6spi (Results 1 - 1 of 1) sorted by relevance
/linux-4.4.14/net/ipv6/ |
H A D | xfrm6_tunnel.c | 90 struct xfrm6_tunnel_spi *x6spi; __xfrm6_tunnel_spi_lookup() local 92 hlist_for_each_entry_rcu(x6spi, __xfrm6_tunnel_spi_lookup() 95 if (xfrm6_addr_equal(&x6spi->addr, saddr)) __xfrm6_tunnel_spi_lookup() 96 return x6spi; __xfrm6_tunnel_spi_lookup() 104 struct xfrm6_tunnel_spi *x6spi; xfrm6_tunnel_spi_lookup() local 108 x6spi = __xfrm6_tunnel_spi_lookup(net, saddr); xfrm6_tunnel_spi_lookup() 109 spi = x6spi ? x6spi->spi : 0; xfrm6_tunnel_spi_lookup() 118 struct xfrm6_tunnel_spi *x6spi; __xfrm6_tunnel_spi_check() local 121 hlist_for_each_entry(x6spi, __xfrm6_tunnel_spi_check() 124 if (x6spi->spi == spi) __xfrm6_tunnel_spi_check() 134 struct xfrm6_tunnel_spi *x6spi; __xfrm6_tunnel_alloc_spi() local 157 x6spi = kmem_cache_alloc(xfrm6_tunnel_spi_kmem, GFP_ATOMIC); __xfrm6_tunnel_alloc_spi() 158 if (!x6spi) __xfrm6_tunnel_alloc_spi() 161 memcpy(&x6spi->addr, saddr, sizeof(x6spi->addr)); __xfrm6_tunnel_alloc_spi() 162 x6spi->spi = spi; __xfrm6_tunnel_alloc_spi() 163 atomic_set(&x6spi->refcnt, 1); __xfrm6_tunnel_alloc_spi() 165 hlist_add_head_rcu(&x6spi->list_byspi, &xfrm6_tn->spi_byspi[index]); __xfrm6_tunnel_alloc_spi() 168 hlist_add_head_rcu(&x6spi->list_byaddr, &xfrm6_tn->spi_byaddr[index]); __xfrm6_tunnel_alloc_spi() 175 struct xfrm6_tunnel_spi *x6spi; xfrm6_tunnel_alloc_spi() local 179 x6spi = __xfrm6_tunnel_spi_lookup(net, saddr); xfrm6_tunnel_alloc_spi() 180 if (x6spi) { xfrm6_tunnel_alloc_spi() 181 atomic_inc(&x6spi->refcnt); xfrm6_tunnel_alloc_spi() 182 spi = x6spi->spi; xfrm6_tunnel_alloc_spi() 200 struct xfrm6_tunnel_spi *x6spi; xfrm6_tunnel_free_spi() local 205 hlist_for_each_entry_safe(x6spi, n, xfrm6_tunnel_free_spi() 209 if (xfrm6_addr_equal(&x6spi->addr, saddr)) { xfrm6_tunnel_free_spi() 210 if (atomic_dec_and_test(&x6spi->refcnt)) { xfrm6_tunnel_free_spi() 211 hlist_del_rcu(&x6spi->list_byaddr); xfrm6_tunnel_free_spi() 212 hlist_del_rcu(&x6spi->list_byspi); xfrm6_tunnel_free_spi() 213 call_rcu(&x6spi->rcu_head, x6spi_destroy_rcu); xfrm6_tunnel_free_spi()
|
Completed in 82 milliseconds