projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc2ce89
)
net: Introduce skb_checksum_start_offset()
author
Michał Mirosław
<mirq-linux@rere.qmqm.pl>
Tue, 14 Dec 2010 15:24:08 +0000
(15:24 +0000)
committer
David S. Miller
<davem@davemloft.net>
Thu, 16 Dec 2010 22:43:14 +0000
(14:43 -0800)
Introduce skb_checksum_start_offset() to replace repetitive calculation.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/skbuff.h
b/include/linux/skbuff.h
index 4c4bec6316d9e17fa3802611ca410eb10fd9c6a5..20ec0a64cb9ff0f8708a66ddaeb2ffd1d3ed72c9 100644
(file)
--- a/
include/linux/skbuff.h
+++ b/
include/linux/skbuff.h
@@
-1355,6
+1355,11
@@
static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
}
#endif /* NET_SKBUFF_DATA_USES_OFFSET */
+static inline int skb_checksum_start_offset(const struct sk_buff *skb)
+{
+ return skb->csum_start - skb_headroom(skb);
+}
+
static inline int skb_transport_offset(const struct sk_buff *skb)
{
return skb_transport_header(skb) - skb->data;