Since packets almost never contain extra garbage at the end, it is
worthwhile to optimize for that case.
Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
Index: csum/include/linux/skbuff.h
===================================================================
--- csum.orig/include/linux/skbuff.h 2005-08-16 19:59:15.000000000 -0700
+++ csum/include/linux/skbuff.h 2005-09-06 20:59:42.000000000 -0700
@@ -1157,7 +1157,7 @@
static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
{
- if (len >= skb->len)
+ if (likely(len >= skb->len))
return 0;
if (skb->ip_summed == CHECKSUM_HW)
skb->ip_summed = CHECKSUM_NONE;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html