direct-io.hg

changeset 11082:9519445d9e9d

[NET] linux: Kill the WARN_ON() calls for checksum fixups.

This changeset is from upstream Linux. We need it so Xen users
using NAT are not unnecessarily alarmed by these WARN_ON errors
especially since they're not in a position to do anything about
it. Original changelog:

[NET]: Kill the WARN_ON() calls for checksum fixups.

We have a more complete solution in the works, involving
the seperation of CHECKSUM_HW on input vs. output, and
having netfilter properly do incremental checksums.

But that is a very involved patch and is thus 2.6.19
material.

What we have now is infinitely better than the past,
wherein all TSO packets were dropped due to corrupt
checksums as soon at the NAT module was loaded. At
least now, the checksums do get fixed up, it just
isn't the cleanest nor most optimal solution.

Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
author kfraser@localhost.localdomain
date Mon Aug 14 13:55:17 2006 +0100 (2006-08-14)
parents 9c953e1b6fad
children e061f14161b0
files linux-2.6-xen-sparse/net/core/dev.c patches/linux-2.6.16.13/net-gso-4-kill-warnon.patch
line diff
     1.1 --- a/linux-2.6-xen-sparse/net/core/dev.c	Mon Aug 14 13:54:10 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/net/core/dev.c	Mon Aug 14 13:55:17 2006 +0100
     1.3 @@ -1093,11 +1093,6 @@ int skb_checksum_help(struct sk_buff *sk
     1.4  		goto out_set_summed;
     1.5  
     1.6  	if (unlikely(skb_shinfo(skb)->gso_size)) {
     1.7 -		static int warned;
     1.8 -
     1.9 -		WARN_ON(!warned);
    1.10 -		warned = 1;
    1.11 -
    1.12  		/* Let GSO fix up the checksum. */
    1.13  		goto out_set_summed;
    1.14  	}
    1.15 @@ -1147,11 +1142,6 @@ struct sk_buff *skb_gso_segment(struct s
    1.16  	__skb_pull(skb, skb->mac_len);
    1.17  
    1.18  	if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
    1.19 -		static int warned;
    1.20 -
    1.21 -		WARN_ON(!warned);
    1.22 -		warned = 1;
    1.23 -
    1.24  		if (skb_header_cloned(skb) &&
    1.25  		    (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
    1.26  			return ERR_PTR(err);
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/patches/linux-2.6.16.13/net-gso-4-kill-warnon.patch	Mon Aug 14 13:55:17 2006 +0100
     2.3 @@ -0,0 +1,29 @@
     2.4 +508c578140642a641bb9b888369719c510ae2a00
     2.5 +diff --git a/net/core/dev.c b/net/core/dev.c
     2.6 +index e814a89..240773b 100644
     2.7 +--- a/net/core/dev.c
     2.8 ++++ b/net/core/dev.c
     2.9 +@@ -1087,11 +1087,6 @@ int skb_checksum_help(struct sk_buff *sk
    2.10 + 		goto out_set_summed;
    2.11 + 
    2.12 + 	if (unlikely(skb_shinfo(skb)->gso_size)) {
    2.13 +-		static int warned;
    2.14 +-
    2.15 +-		WARN_ON(!warned);
    2.16 +-		warned = 1;
    2.17 +-
    2.18 + 		/* Let GSO fix up the checksum. */
    2.19 + 		goto out_set_summed;
    2.20 + 	}
    2.21 +@@ -1141,11 +1136,6 @@ struct sk_buff *skb_gso_segment(struct s
    2.22 + 	__skb_pull(skb, skb->mac_len);
    2.23 + 
    2.24 + 	if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
    2.25 +-		static int warned;
    2.26 +-
    2.27 +-		WARN_ON(!warned);
    2.28 +-		warned = 1;
    2.29 +-
    2.30 + 		if (skb_header_cloned(skb) &&
    2.31 + 		    (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
    2.32 + 			return ERR_PTR(err);