diff options
author | Jason Wang <jasowang@redhat.com> | 2017-05-17 12:14:38 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-18 10:07:39 -0400 |
commit | 3acb696015a222f4b25c1b5dce4e36b2d4980da6 (patch) | |
tree | 617fe0cbe3921b642f8c1c5231ac8b3948b9fc3a /include | |
parent | 197a5212c3dd70be267b5cd930be0fb68bb53018 (diff) |
skb_array: introduce skb_array_unconsume
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/skb_array.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h index f4dfade428f0..79850b638bf2 100644 --- a/include/linux/skb_array.h +++ b/include/linux/skb_array.h @@ -156,6 +156,12 @@ static void __skb_array_destroy_skb(void *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) { return ptr_ring_resize(&a->ring, size, gfp, __skb_array_destroy_skb); |