summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2017-12-07 20:57:59 +0300
committerDavid S. Miller <davem@davemloft.net>2017-12-08 21:32:26 +0300
commit4a86a4cf68b4996a656d8c666617e8d839f8f839 (patch)
treef82764a48f63554dfd9df4eaaeb124e3a0309a54
parentce679e8df7ed2a92660556d100cf370fe22b4eab (diff)
downloadlinux-4a86a4cf68b4996a656d8c666617e8d839f8f839.tar.xz
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.fastabend@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/skb_array.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index 8621ffdeecbf..c7addf37d119 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);