WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, Xen Development Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [NET] linux: Kill the WARN_ON() calls for checksum fixups.
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 4 Aug 2006 17:05:49 +1000
Delivery-date: Fri, 04 Aug 2006 00:06:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
Hi Keir:

Upstream has just added this change set.  IMHO it makes even more
sense for Xen so I'm posting it to you.

[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@xxxxxxxxxxxxx>

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff -r ea04335d238b linux-2.6-xen-sparse/net/core/dev.c
--- a/linux-2.6-xen-sparse/net/core/dev.c       Thu Aug 03 19:45:14 2006 +0100
+++ b/linux-2.6-xen-sparse/net/core/dev.c       Fri Aug 04 17:03:05 2006 +1000
@@ -1093,11 +1093,6 @@ int skb_checksum_help(struct sk_buff *sk
                goto out_set_summed;
 
        if (unlikely(skb_shinfo(skb)->gso_size)) {
-               static int warned;
-
-               WARN_ON(!warned);
-               warned = 1;
-
                /* Let GSO fix up the checksum. */
                goto out_set_summed;
        }
@@ -1147,11 +1142,6 @@ struct sk_buff *skb_gso_segment(struct s
        __skb_pull(skb, skb->mac_len);
 
        if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
-               static int warned;
-
-               WARN_ON(!warned);
-               warned = 1;
-
                if (skb_header_cloned(skb) &&
                    (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
                        return ERR_PTR(err);
diff -r ea04335d238b patches/linux-2.6.16.13/net-gso-4-kill-warnon.patch
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/linux-2.6.16.13/net-gso-4-kill-warnon.patch       Fri Aug 04 
17:03:05 2006 +1000
@@ -0,0 +1,29 @@
+508c578140642a641bb9b888369719c510ae2a00
+diff --git a/net/core/dev.c b/net/core/dev.c
+index e814a89..240773b 100644
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -1087,11 +1087,6 @@ int skb_checksum_help(struct sk_buff *sk
+               goto out_set_summed;
+ 
+       if (unlikely(skb_shinfo(skb)->gso_size)) {
+-              static int warned;
+-
+-              WARN_ON(!warned);
+-              warned = 1;
+-
+               /* Let GSO fix up the checksum. */
+               goto out_set_summed;
+       }
+@@ -1141,11 +1136,6 @@ struct sk_buff *skb_gso_segment(struct s
+       __skb_pull(skb, skb->mac_len);
+ 
+       if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
+-              static int warned;
+-
+-              WARN_ON(!warned);
+-              warned = 1;
+-
+               if (skb_header_cloned(skb) &&
+                   (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
+                       return ERR_PTR(err);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>