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.
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