aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-10 10:30:58 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:37 -0400
commit48d49d0ccdaa9caff4636ef9c3410973d28131b5 (patch)
tree3bdf0729bf05e817d1bb9c3299906682414f8a76 /include
parentf64955eb117ad62480b858fd69a11e6f9e74f60b (diff)
[SK_BUFF]: Introduce skb_set_mac_header()
For the cases where we want to set skb->mac.raw to an offset from skb->data. Simple cases first, the memmove ones and specially pktgen will be left for later. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 748f254b50cc..43ab6cbf8446 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -965,6 +965,11 @@ static inline void skb_reset_mac_header(struct sk_buff *skb)
965 skb->mac.raw = skb->data; 965 skb->mac.raw = skb->data;
966} 966}
967 967
968static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
969{
970 skb->mac.raw = skb->data + offset;
971}
972
968/* 973/*
969 * CPUs often take a performance hit when accessing unaligned memory 974 * CPUs often take a performance hit when accessing unaligned memory
970 * locations. The actual performance hit varies, it can be small if the 975 * locations. The actual performance hit varies, it can be small if the