diff options
| author | Jason Wang <jasowang@redhat.com> | 2017-05-17 00:14:38 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-05-18 10:07:39 -0400 |
| commit | 3acb696015a222f4b25c1b5dce4e36b2d4980da6 (patch) | |
| tree | 617fe0cbe3921b642f8c1c5231ac8b3948b9fc3a /include/linux/skb_array.h | |
| 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/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) | |||
| 156 | kfree_skb(ptr); | 156 | kfree_skb(ptr); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | static inline void skb_array_unconsume(struct skb_array *a, | ||
| 160 | struct sk_buff **skbs, int n) | ||
| 161 | { | ||
| 162 | ptr_ring_unconsume(&a->ring, (void **)skbs, n, __skb_array_destroy_skb); | ||
| 163 | } | ||
| 164 | |||
| 159 | static inline int skb_array_resize(struct skb_array *a, int size, gfp_t gfp) | 165 | static inline int skb_array_resize(struct skb_array *a, int size, gfp_t gfp) |
| 160 | { | 166 | { |
| 161 | return ptr_ring_resize(&a->ring, size, gfp, __skb_array_destroy_skb); | 167 | return ptr_ring_resize(&a->ring, size, gfp, __skb_array_destroy_skb); |
