direct-io.hg
changeset 8632:911b6d8cd666
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@gondor.com>
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@gondor.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Thu Jan 19 20:11:09 2006 +0100 (2006-01-19) |
parents | 8a3549172896 |
children | c4ae9456a459 |
files | linux-2.6-xen-sparse/drivers/xen/netback/loopback.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/loopback.c Thu Jan 19 20:04:53 2006 +0100 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/loopback.c Thu Jan 19 20:11:09 2006 +0100 1.3 @@ -27,6 +27,7 @@ 1.4 #include <linux/inetdevice.h> 1.5 #include <linux/etherdevice.h> 1.6 #include <linux/skbuff.h> 1.7 +#include <linux/ethtool.h> 1.8 #include <net/dst.h> 1.9 1.10 static int nloopbacks = 8; 1.11 @@ -122,6 +123,12 @@ static void loopback_construct(struct ne 1.12 /*dev->mtu = 16*1024;*/ 1.13 } 1.14 1.15 +static struct ethtool_ops network_ethtool_ops = 1.16 +{ 1.17 + .get_tx_csum = ethtool_op_get_tx_csum, 1.18 + .set_tx_csum = ethtool_op_set_tx_csum, 1.19 +}; 1.20 + 1.21 static int __init make_loopback(int i) 1.22 { 1.23 struct net_device *dev1, *dev2; 1.24 @@ -141,6 +148,8 @@ static int __init make_loopback(int i) 1.25 dev1->features |= NETIF_F_NO_CSUM; 1.26 dev2->features |= NETIF_F_IP_CSUM; 1.27 1.28 + SET_ETHTOOL_OPS(dev2, &network_ethtool_ops); 1.29 + 1.30 /* 1.31 * Initialise a dummy MAC address for the 'dummy backend' interface. We 1.32 * choose the numerically largest non-broadcast address to prevent the