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

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



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 9519445d9e9d7b8bd48fcd93d1bba485508ddbff
# Parent  9c953e1b6faddce519896d4a84302952c8e1d2b9
[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>
---
 linux-2.6-xen-sparse/net/core/dev.c                 |   10 -------
 patches/linux-2.6.16.13/net-gso-4-kill-warnon.patch |   28 ++++++++++++++++++++
 2 files changed, 28 insertions(+), 10 deletions(-)

diff -r 9c953e1b6fad -r 9519445d9e9d linux-2.6-xen-sparse/net/core/dev.c
--- a/linux-2.6-xen-sparse/net/core/dev.c       Mon Aug 14 13:54:10 2006 +0100
+++ b/linux-2.6-xen-sparse/net/core/dev.c       Mon Aug 14 13:55:17 2006 +0100
@@ -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 9c953e1b6fad -r 9519445d9e9d 
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       Mon Aug 14 
13:55:17 2006 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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