mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
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>
This commit is contained in:
parent
59e6ae5324
commit
bf900b3dbe
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
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)
|
static inline void skb_array_cleanup(struct skb_array *a)
|
||||||
{
|
{
|
||||||
ptr_ring_cleanup(&a->ring, __skb_array_destroy_skb);
|
ptr_ring_cleanup(&a->ring, __skb_array_destroy_skb);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue