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-changelog

[Xen-changelog] Allow disabling the tx checksums on the xen loopback

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Allow disabling the tx checksums on the xen loopback
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 Jan 2006 19:40:07 +0000
Delivery-date: Fri, 20 Jan 2006 19:48:44 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 911b6d8cd6669b12d16edfd05b2ebfe1216e1d1e
# Parent  8a354917289690417d31c9aefea140b03bc538cf
Allow disabling the tx checksums on the xen loopback
interface, which is used for the virtual interfaces of dom0 instead 
of netfront/netback.

I need to issue ethtool -K eth0 tx off to work around a bad checksum
problem, which has been reported for domUs a few months ago. I'm
bridging dom0's eth0 to a domU where I do NAT to a different virtual
interface. Without this change, I get lots of packets with bad
checksums.

Signed-off-by: Jan Niehusmann <jan@xxxxxxxxxx>

diff -r 8a3549172896 -r 911b6d8cd666 
linux-2.6-xen-sparse/drivers/xen/netback/loopback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/loopback.c       Thu Jan 19 
19:04:53 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/loopback.c       Thu Jan 19 
19:11:09 2006
@@ -27,6 +27,7 @@
 #include <linux/inetdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
+#include <linux/ethtool.h>
 #include <net/dst.h>
 
 static int nloopbacks = 8;
@@ -122,6 +123,12 @@
        /*dev->mtu             = 16*1024;*/
 }
 
+static struct ethtool_ops network_ethtool_ops =
+{
+       .get_tx_csum = ethtool_op_get_tx_csum,
+       .set_tx_csum = ethtool_op_set_tx_csum,
+};
+
 static int __init make_loopback(int i)
 {
        struct net_device *dev1, *dev2;
@@ -140,6 +147,8 @@
 
        dev1->features |= NETIF_F_NO_CSUM;
        dev2->features |= NETIF_F_IP_CSUM;
+
+       SET_ETHTOOL_OPS(dev2, &network_ethtool_ops);
 
        /*
         * Initialise a dummy MAC address for the 'dummy backend' interface. We

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Allow disabling the tx checksums on the xen loopback, Xen patchbot -unstable <=