[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170502154032.9304.50203.stgit@john-Precision-Tower-5810>
Date: Tue, 02 May 2017 08:40:32 -0700
From: John Fastabend <john.fastabend@...il.com>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org, john.fastabend@...il.com
Subject: [RFC PATCH v2 14/17] net: skb_array: expose peek API
This adds a peek routine to skb_array.h for use with qdisc.
Signed-off-by: John Fastabend <john.r.fastabend@...el.com>
---
include/linux/skb_array.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index f4dfade..33f1f0c 100644
--- a/include/linux/skb_array.h
+++ b/include/linux/skb_array.h
@@ -72,6 +72,11 @@ static inline bool __skb_array_empty(struct skb_array *a)
return !__ptr_ring_peek(&a->ring);
}
+static inline struct sk_buff *skb_array_peek(struct skb_array *a)
+{
+ return __ptr_ring_peek(&a->ring);
+}
+
static inline bool skb_array_empty(struct skb_array *a)
{
return ptr_ring_empty(&a->ring);
Powered by blists - more mailing lists