projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b11d78
)
[NET]: Optimize pskb_trim_rcsum()
author
Stephen Hemminger
<shemminger@osdl.org>
Thu, 8 Sep 2005 19:32:03 +0000
(12:32 -0700)
committer
David S. Miller
<davem@davemloft.net>
Thu, 8 Sep 2005 19:32:03 +0000
(12:32 -0700)
Since packets almost never contain extra garbage at the end, it is
worthwhile to optimize for that case.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
patch
|
blob
|
history
diff --git
a/include/linux/skbuff.h
b/include/linux/skbuff.h
index da7da9c0ed1b50e1f8dac7c08b919c104c287e30..2741c0c55e83e1f486a7effc3772a63da8f4e3ed 100644
(file)
--- a/
include/linux/skbuff.h
+++ b/
include/linux/skbuff.h
@@
-1167,7
+1167,7
@@
static inline void skb_postpull_rcsum(struct sk_buff *skb,
static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
{
- if (l
en >= skb->len
)
+ if (l
ikely(len >= skb->len)
)
return 0;
if (skb->ip_summed == CHECKSUM_HW)
skb->ip_summed = CHECKSUM_NONE;