From: Jan Niehusmann <jan@gondor.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] enable ethtool for xen loopback interface (network in dom0)
Date: Sat, 14 Jan 2006 12:58:03 +0100 [thread overview]
Message-ID: <20060114115803.GA5863@gondor.com> (raw)
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
next reply other threads:[~2006-01-14 11:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-14 11:58 Jan Niehusmann [this message]
2006-01-24 9:11 ` [PATCH] enable ethtool for xen loopback interface(network in dom0) Greg Brackley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060114115803.GA5863@gondor.com \
--to=jan@gondor.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.