tree 5700dfd0ceab3b435a7fc91cc25e56bb911ce2a9
parent 1b11d78cf87a7014f96e5b7fa2e1233cc8081a00
author Stephen Hemminger <[EMAIL PROTECTED]> Fri, 09 Sep 2005 02:32:03 -0700
committer David S. Miller <[EMAIL PROTECTED]> Fri, 09 Sep 2005 02:32:03 -0700

[NET]: Optimize pskb_trim_rcsum()

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]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>


 include/linux/skbuff.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1167,7 +1167,7 @@ static inline void skb_postpull_rcsum(st
 
 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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to