diff options
author | Jason Wang <jasowang@redhat.com> | 2017-05-17 07:14:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-18 17:07:39 +0300 |
commit | 3acb696015a222f4b25c1b5dce4e36b2d4980da6 (patch) | |
tree | 617fe0cbe3921b642f8c1c5231ac8b3948b9fc3a /include/linux/skb_array.h | |
parent | 197a5212c3dd70be267b5cd930be0fb68bb53018 (diff) | |
download | linux-3acb696015a222f4b25c1b5dce4e36b2d4980da6.tar.xz |
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/linux/skb_array.h')
-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); |