From: Jason Wang Date: Thu, 30 Jun 2016 06:45:34 +0000 (+0800) Subject: skb_array: add wrappers for resizing X-Git-Tag: v4.14-rc1~2816^2~216^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf900b3dbefee49855c17aa09fb4245346a78fb3;p=platform%2Fkernel%2Flinux-rpi.git skb_array: add wrappers for resizing Signed-off-by: Michael S. Tsirkin Signed-off-by: Jason Wang Signed-off-by: David S. Miller --- diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h index 2dd0d1e..f4dfade 100644 --- a/include/linux/skb_array.h +++ b/include/linux/skb_array.h @@ -161,6 +161,15 @@ 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); } +static inline int skb_array_resize_multiple(struct skb_array **rings, + int nrings, int size, gfp_t gfp) +{ + BUILD_BUG_ON(offsetof(struct skb_array, ring)); + return ptr_ring_resize_multiple((struct ptr_ring **)rings, + nrings, size, gfp, + __skb_array_destroy_skb); +} + static inline void skb_array_cleanup(struct skb_array *a) { ptr_ring_cleanup(&a->ring, __skb_array_destroy_skb);