net: skb_array: expose peek API
authorJohn Fastabend <john.fastabend@gmail.com>
Thu, 7 Dec 2017 17:57:59 +0000 (09:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Dec 2017 18:32:26 +0000 (13:32 -0500)
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>
include/linux/skb_array.h

index 8621ffdeecbf0542e57c2d7fee12f53546af7774..c7addf37d11987e656bfc3e107f1bac3ea5f97a7 100644 (file)
@@ -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);