Commit 3528c1a5 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller

skb_array: introduce batch dequeuing

Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 728fc8d5
...@@ -97,21 +97,46 @@ static inline struct sk_buff *skb_array_consume(struct skb_array *a) ...@@ -97,21 +97,46 @@ static inline struct sk_buff *skb_array_consume(struct skb_array *a)
return ptr_ring_consume(&a->ring); return ptr_ring_consume(&a->ring);
} }
static inline int skb_array_consume_batched(struct skb_array *a,
struct sk_buff **array, int n)
{
return ptr_ring_consume_batched(&a->ring, (void **)array, n);
}
static inline struct sk_buff *skb_array_consume_irq(struct skb_array *a) static inline struct sk_buff *skb_array_consume_irq(struct skb_array *a)
{ {
return ptr_ring_consume_irq(&a->ring); return ptr_ring_consume_irq(&a->ring);
} }
static inline int skb_array_consume_batched_irq(struct skb_array *a,
struct sk_buff **array, int n)
{
return ptr_ring_consume_batched_irq(&a->ring, (void **)array, n);
}
static inline struct sk_buff *skb_array_consume_any(struct skb_array *a) static inline struct sk_buff *skb_array_consume_any(struct skb_array *a)
{ {
return ptr_ring_consume_any(&a->ring); return ptr_ring_consume_any(&a->ring);
} }
static inline int skb_array_consume_batched_any(struct skb_array *a,
struct sk_buff **array, int n)
{
return ptr_ring_consume_batched_any(&a->ring, (void **)array, n);
}
static inline struct sk_buff *skb_array_consume_bh(struct skb_array *a) static inline struct sk_buff *skb_array_consume_bh(struct skb_array *a)
{ {
return ptr_ring_consume_bh(&a->ring); return ptr_ring_consume_bh(&a->ring);
} }
static inline int skb_array_consume_batched_bh(struct skb_array *a,
struct sk_buff **array, int n)
{
return ptr_ring_consume_batched_bh(&a->ring, (void **)array, n);
}
static inline int __skb_array_len_with_tag(struct sk_buff *skb) static inline int __skb_array_len_with_tag(struct sk_buff *skb)
{ {
if (likely(skb)) { if (likely(skb)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment