Lines Matching refs:sp
19 void __secpath_destroy(struct sec_path *sp) in __secpath_destroy() argument
22 for (i = 0; i < sp->len; i++) in __secpath_destroy()
23 xfrm_state_put(sp->xvec[i]); in __secpath_destroy()
24 kmem_cache_free(secpath_cachep, sp); in __secpath_destroy()
30 struct sec_path *sp; in secpath_dup() local
32 sp = kmem_cache_alloc(secpath_cachep, GFP_ATOMIC); in secpath_dup()
33 if (!sp) in secpath_dup()
36 sp->len = 0; in secpath_dup()
40 memcpy(sp, src, sizeof(*sp)); in secpath_dup()
41 for (i = 0; i < sp->len; i++) in secpath_dup()
42 xfrm_state_hold(sp->xvec[i]); in secpath_dup()
44 atomic_set(&sp->refcnt, 1); in secpath_dup()
45 return sp; in secpath_dup()
126 if (!skb->sp || atomic_read(&skb->sp->refcnt) != 1) { in xfrm_input()
127 struct sec_path *sp; in xfrm_input() local
129 sp = secpath_dup(skb->sp); in xfrm_input()
130 if (!sp) { in xfrm_input()
134 if (skb->sp) in xfrm_input()
135 secpath_put(skb->sp); in xfrm_input()
136 skb->sp = sp; in xfrm_input()
150 if (skb->sp->len == XFRM_MAX_DEPTH) { in xfrm_input()
162 skb->sp->xvec[skb->sp->len++] = x; in xfrm_input()