[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



Hi Keir:

This is a resend.  I still think that it would be good to include this
patch in Xen to reduce the amount of time wasted on unnecessary user
reports of these warning messages.

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

As an update there is now a (fairly large) patch by Patrick McHardy
slated for 2.6.19 that should fix the problem properly.  Incidentally
that patch should also allow us to get rid of the proto_data_valid and
proto_data_blank fields since it allows Linux to tell RX CHECKSUM_HW
and TX CHECKSUM_HW.

Once that patch is in Xen can move the call to skb_checksum_help into
netbk and set the resulting packet to CHECKSUM_PARTIAL instead of
CHECKSUM_HW.

[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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.