Skip to content

Commit

Permalink
net: skb_array: expose peek API
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Fastabend authored and David S. Miller committed Dec 8, 2017
1 parent ce679e8 commit 4a86a4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/linux/skb_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4a86a4c

Please sign in to comment.