Commit 3acb6960 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller

skb_array: introduce skb_array_unconsume

Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 197a5212
...@@ -156,6 +156,12 @@ static void __skb_array_destroy_skb(void *ptr) ...@@ -156,6 +156,12 @@ static void __skb_array_destroy_skb(void *ptr)
kfree_skb(ptr); kfree_skb(ptr);
} }
static inline void skb_array_unconsume(struct skb_array *a,
struct sk_buff **skbs, int n)
{
ptr_ring_unconsume(&a->ring, (void **)skbs, n, __skb_array_destroy_skb);
}
static inline int skb_array_resize(struct skb_array *a, int size, gfp_t gfp) static inline int skb_array_resize(struct skb_array *a, int size, gfp_t gfp)
{ {
return ptr_ring_resize(&a->ring, size, gfp, __skb_array_destroy_skb); return ptr_ring_resize(&a->ring, size, gfp, __skb_array_destroy_skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment