Skip to contentSkip to conversation

sk_buff: introduce pskb_network_may_pull()

PATCH Applied Changli Gao 2 participants 2 messages Aug 4, 2010 – Aug 5, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 sk_buff: introduce pskb_network_may_pull()

---
 include/linux/skbuff.h |    5 +++++
 1 file changed, 5 insertions(+)
include/linux/skbuff.h +5 -0
index d20d9e7..77eb60d 100644
@@ -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