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

[Xen-changelog] [xen-unstable] [NET] front: Fix features on resume when csum is off



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID ebd289e3d2052799c4355f569a46c83d0e4d6635
# Parent  30fb6ea3a1f7c3b01160fc6f94adeae9a77aafc2
[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>
---
 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -r 30fb6ea3a1f7 -r ebd289e3d205 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed Aug 16 
14:01:03 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed Aug 16 
14:26:59 2006 +0100
@@ -1369,6 +1369,10 @@ static void xennet_set_features(struct n
        dev->features |= NETIF_F_GSO_ROBUST;
        xennet_set_sg(dev, 0);
 
+       /* We need checksum offload to enable scatter/gather and TSO. */
+       if (!(dev->features & NETIF_F_ALL_CSUM))
+               return;
+
        if (!xennet_set_sg(dev, 1))
                xennet_set_tso(dev, 1);
 }

_______________________________________________
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®.