Lines Matching refs:skb
37 static inline struct can_skb_priv *can_skb_prv(struct sk_buff *skb) in can_skb_prv() argument
39 return (struct can_skb_priv *)(skb->head); in can_skb_prv()
42 static inline void can_skb_reserve(struct sk_buff *skb) in can_skb_reserve() argument
44 skb_reserve(skb, sizeof(struct can_skb_priv)); in can_skb_reserve()
47 static inline void can_skb_destructor(struct sk_buff *skb) in can_skb_destructor() argument
49 sock_put(skb->sk); in can_skb_destructor()
52 static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk) in can_skb_set_owner() argument
56 skb->destructor = can_skb_destructor; in can_skb_set_owner()
57 skb->sk = sk; in can_skb_set_owner()
64 static inline struct sk_buff *can_create_echo_skb(struct sk_buff *skb) in can_create_echo_skb() argument
66 if (skb_shared(skb)) { in can_create_echo_skb()
67 struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); in can_create_echo_skb()
70 can_skb_set_owner(nskb, skb->sk); in can_create_echo_skb()
71 consume_skb(skb); in can_create_echo_skb()
74 kfree_skb(skb); in can_create_echo_skb()
80 return skb; in can_create_echo_skb()