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] front: Fix features on resume when csum is off

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, Xen Development Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [NET] front: Fix features on resume when csum is off
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Aug 2006 11:11:22 +1000
Cc: Anton Burtsev <aburtsev@xxxxxxxxxxxxx>
Delivery-date: Tue, 15 Aug 2006 18:12:02 -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:

[NET] front: Fix features on resume when csum is off

When the netfront driver is resumed the features are renegotiated with
the backend.  However, I forgot take into account the status of the TX
checksum setting.  When TX checksum is disabled by the user, we cannot
enable SG or TSO since both require checksum offload.  This patch makes
xennet check the checksum setting before renegotiating SG or TSO.

This bug was fixed thanks to a report from Anton Burtsev.

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 ec03b24a2d83 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Tue Aug 15 
19:53:55 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed Aug 16 
11:07:11 2006 +1000
@@ -1369,6 +1369,9 @@ static void xennet_set_features(struct n
        dev->features |= NETIF_F_GSO_ROBUST;
        xennet_set_sg(dev, 0);
 
+       if (!(dev->features & NETIF_F_IP_CSUM))
+               return;
+
        if (!xennet_set_sg(dev, 1))
                xennet_set_tso(dev, 1);
 }

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

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