Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

skb_array: add wrappers for resizing

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jason Wang and committed by
David S. Miller
bf900b3d 59e6ae53

+9
+9
include/linux/skb_array.h
··· 161 161 return ptr_ring_resize(&a->ring, size, gfp, __skb_array_destroy_skb); 162 162 } 163 163 164 + static inline int skb_array_resize_multiple(struct skb_array **rings, 165 + int nrings, int size, gfp_t gfp) 166 + { 167 + BUILD_BUG_ON(offsetof(struct skb_array, ring)); 168 + return ptr_ring_resize_multiple((struct ptr_ring **)rings, 169 + nrings, size, gfp, 170 + __skb_array_destroy_skb); 171 + } 172 + 164 173 static inline void skb_array_cleanup(struct skb_array *a) 165 174 { 166 175 ptr_ring_cleanup(&a->ring, __skb_array_destroy_skb);