* [PATCH v2 1/4] sk_buff: introduce pskb_network_may_pull()
@ 2010-08-04 14:43 Changli Gao
2010-08-05 4:55 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Changli Gao @ 2010-08-04 14:43 UTC (permalink / raw)
To: David S. Miller; +Cc: Jamal Hadi Salim, Patrick McHardy, netdev, Changli Gao
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
include/linux/skbuff.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index d20d9e7..77eb60d 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-05 4:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-04 14:43 [PATCH v2 1/4] sk_buff: introduce pskb_network_may_pull() Changli Gao
2010-08-05 4:55 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).