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

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH] enable ethtool for xen loopback interface (network i

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] enable ethtool for xen loopback interface (network in dom0)
From: Jan Niehusmann <jan@xxxxxxxxxx>
Date: 2006年1月14日 12:58:03 +0100
Delivery-date: 2006年1月16日 11:00:13 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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,
this patch allows 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.
Jan
Signed-off-by: Jan Niehusmann <jan@xxxxxxxxxx>
--- linux-2.6.12/drivers/xen/netback/loopback.c.orig 2006年01月14日 
12:46:42.000000000 +0100
+++ linux-2.6.12/drivers/xen/netback/loopback.c 2006年01月14日 11:59:49.000000000 
+0100
@@ -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;
@@ -141,6 +148,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
 * choose the numerically largest non-broadcast address to prevent the
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] Re: [Xen-users] Problem running xenmon , Anand
Next by Date: [Xen-devel] question about guest-to-guest networking , Aravind Menon
Previous by Thread: [Xen-devel] VMX status report changset 8612 , Shi, Kuiliang
Next by Thread: Re: [Xen-devel] [PATCH] enable ethtool for xen loopback interface(network in dom0) , Greg Brackley
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /