lkml.org 
[lkml]   [2017]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next 2/8] skb_array: introduce batch dequeuing
Date
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
include/linux/skb_array.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index f4dfade..90e44b9 100644
--- a/include/linux/skb_array.h
+++ b/include/linux/skb_array.h
@@ -97,21 +97,46 @@ static inline struct sk_buff *skb_array_consume(struct skb_array *a)
return ptr_ring_consume(&a->ring);
}

+static inline int skb_array_consume_batched(struct skb_array *a,
+ void **array, int n)
+{
+ return ptr_ring_consume_batched(&a->ring, array, n);
+}
+
static inline struct sk_buff *skb_array_consume_irq(struct skb_array *a)
{
return ptr_ring_consume_irq(&a->ring);
}

+static inline int skb_array_consume_batched_irq(struct skb_array *a,
+ void **array, int n)
+{
+ return ptr_ring_consume_batched_irq(&a->ring, array, n);
+}
+
static inline struct sk_buff *skb_array_consume_any(struct skb_array *a)
{
return ptr_ring_consume_any(&a->ring);
}

+static inline int skb_array_consume_batched_any(struct skb_array *a,
+ void **array, int n)
+{
+ return ptr_ring_consume_batched_any(&a->ring, array, n);
+}
+
+
static inline struct sk_buff *skb_array_consume_bh(struct skb_array *a)
{
return ptr_ring_consume_bh(&a->ring);
}

+static inline int skb_array_consume_batched_bh(struct skb_array *a,
+ void **array, int n)
+{
+ return ptr_ring_consume_batched_bh(&a->ring, array, n);
+}
+
static inline int __skb_array_len_with_tag(struct sk_buff *skb)
{
if (likely(skb)) {
--
2.7.4
\
 
 \ /
  Last update: 2017-03-21 05:16    [W:0.140 / U:1.552 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site