From: Changli Gao Date: Wed, 4 Aug 2010 04:43:44 +0000 (+0000) Subject: sk_buff: introduce pskb_network_may_pull() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f9599ce11192f24dbb0f4fdb70121a05edc58342;p=openwrt%2Fstaging%2Fblogic.git sk_buff: introduce pskb_network_may_pull() Signed-off-by: Changli Gao Signed-off-by: David S. Miller --- diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index d20d9e7a9bbd..77eb60d2b496 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1379,6 +1379,11 @@ static inline int skb_network_offset(const struct sk_buff *skb) return skb_network_header(skb) - skb->data; } +static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) +{ + return pskb_may_pull(skb, skb_network_offset(skb) + len); +} + /* * CPUs often take a performance hit when accessing unaligned memory * locations. The actual performance hit varies, it can be small if the