]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
commit ea2ae17d6443abddc79480dc9f7af8feacabddc4 git-c9bdd4b5257406b0608385d19c40b5511decf4f6-partial
authort_jeang <devnull@localhost>
Tue, 6 Jan 2009 12:05:21 +0000 (12:05 +0000)
committert_jeang <devnull@localhost>
Tue, 6 Jan 2009 12:05:21 +0000 (12:05 +0000)
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date:   Wed Apr 25 17:55:53 2007 -0700

    [SK_BUFF]: Introduce skb_transport_offset()

    For the quite common 'skb->h.raw - skb->data' sequence.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Edited: Ian Campbell -- just definition.

include/linux/skbuff.h

index 46ad73c420a93db7d5f6b8528ec7e0ca6510b40a..feb82ade1d62647d84bb78116cc88f19b37a38d9 100644 (file)
@@ -963,6 +963,11 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
        skb->tail += len;
 }
 
+static inline int skb_transport_offset(const struct sk_buff *skb)
+{
+       return skb->h.raw - skb->data;
+}
+
 /*
  * CPUs often take a performance hit when accessing unaligned memory
  * locations. The actual performance hit varies, it can be small if the