Commit d1062b50 authored by Stephen Hemminger's avatar Stephen Hemminger

[NET]: Add likely/unlikely to pskb_may_pull.

parent 1223d528
......@@ -904,9 +904,9 @@ static inline unsigned char *pskb_pull(struct sk_buff *skb, unsigned int len)
static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len)
{
if (len <= skb_headlen(skb))
if (likely(len <= skb_headlen(skb)))
return 1;
if (len > skb->len)
if (unlikely(len > skb->len))
return 0;
return __pskb_pull_tail(skb, len-skb_headlen(skb)) != NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment