* [PATCH] enable ethtool for xen loopback interface (network in dom0)
@ 2006-01-14 11:58 Jan Niehusmann
2006-01-24 9:11 ` [PATCH] enable ethtool for xen loopback interface(network " Greg Brackley
0 siblings, 1 reply; 2+ messages in thread
From: Jan Niehusmann @ 2006-01-14 11:58 UTC (permalink / raw)
To: xen-devel
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@gondor.com>
--- 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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] enable ethtool for xen loopback interface(network in dom0)
2006-01-14 11:58 [PATCH] enable ethtool for xen loopback interface (network in dom0) Jan Niehusmann
@ 2006-01-24 9:11 ` Greg Brackley
0 siblings, 0 replies; 2+ messages in thread
From: Greg Brackley @ 2006-01-24 9:11 UTC (permalink / raw)
To: Jan Niehusmann, xen-devel
----- Original Message -----
From: "Jan Niehusmann" <jan@gondor.com>
> 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.
Great patch thanks. I finally got around to upgrading a box to Xen 3.0
testing (changeset 8269:a91e4dcf629d), applied the patch and it works a
dream. I can now bridge the xen0 domain onto a VLAN interface with a
pro/1000 MT server NIC (82546EB).
I am using Fedora Core 4 (which doesn't appear to support -K ethtool options
in the initscripts), and have added a /sbin/ifup-local script [1] to the
system. This in conjunction with adding 'ETHTOOL_KOPTS="tx off"' [2] to my
interface configuration works well (Note: I use the standard initscripts to
bring up the networking, and not 'network-bridge').
I'm concerned that there may be some performance hit with software
checksumming, but I'm happy with working rather than faster. Getting jumbo
frame support in the domU's would be probably be a better performance boost.
Greg :-)
--
[1] /sbin/ifup-local
#!/bin/sh
cd /etc/sysconfig/network-scripts
. network-functions
[ -f ../network ] && . ../network
CONFIG="ifcfg-${1}"
source_config
if [ -n "$ETHTOOL_KOPTS" ] ; then
REALDEVICE=${DEVICE%%:*}
/sbin/ethtool -K ${REALDEVICE} $ETHTOOL_KOPTS
fi
[2] /etc/sysconfig/network-scripts/ifcfg-veth0
DEVICE=veth0
TYPE=Ethernet
ONBOOT=yes
IPADDR=192.168.133.1
NETMASK=255.255.255.0
MACADDR=00:aa:00:00:85:01
NOZEROCONF=yes
GATEWAY=192.168.133.254
ARP=yes
ETHTOOL_KOPTS="tx off"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-24 9:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-14 11:58 [PATCH] enable ethtool for xen loopback interface (network in dom0) Jan Niehusmann
2006-01-24 9:11 ` [PATCH] enable ethtool for xen loopback interface(network " Greg Brackley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.