LinuxKPI: SKB: implement skb_peek()

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb 2022-11-28 18:47:08 +00:00
parent 23c73dbae7
commit ce9f36610e

View File

@ -558,6 +558,18 @@ skb_queue_tail(struct sk_buff_head *q, struct sk_buff *skb)
return (__skb_queue_tail(q, skb));
}
static inline struct sk_buff *
skb_peek(struct sk_buff_head *q)
{
struct sk_buff *skb;
skb = q->next;
SKB_TRACE2(q, skb);
if (skb == (struct sk_buff *)q)
return (NULL);
return (skb);
}
static inline struct sk_buff *
skb_peek_tail(struct sk_buff_head *q)
{
@ -910,14 +922,6 @@ skb_reset_mac_header(struct sk_buff *skb)
SKB_TODO();
}
static inline struct sk_buff *
skb_peek(struct sk_buff_head *q)
{
SKB_TRACE(q);
SKB_TODO();
return (NULL);
}
static inline __sum16
csum_unfold(__sum16 sum)
{