ChangeSet 1.1518, 2005/05/23 21:04:24+01:00, bren@xxxxxxxxxxxxxxxxxxxxxxx
Add ethtools support to turn on/off Tx checksum offloading in
the netfront driver.
Signed-off-by: Jon Mason <jdmason@xxxxxxxxxx>
netfront.c | 8 ++++++++
1 files changed, 8 insertions(+)
diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c
b/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c 2005-05-23
17:02:23 -04:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c 2005-05-23
17:02:23 -04:00
@@ -40,6 +40,7 @@
#include <linux/init.h>
#include <linux/bitops.h>
#include <linux/proc_fs.h>
+#include <linux/ethtool.h>
#include <net/sock.h>
#include <net/pkt_sched.h>
#include <net/arp.h>
@@ -928,6 +929,11 @@
vif_show(np);
}
+static struct ethtool_ops network_ethtool_ops =
+{
+ .get_tx_csum = ethtool_op_get_tx_csum,
+ .set_tx_csum = ethtool_op_set_tx_csum,
+};
/** Create a network device.
* @param handle device handle
@@ -972,6 +978,8 @@
dev->poll = netif_poll;
dev->weight = 64;
dev->features = NETIF_F_IP_CSUM;
+
+ SET_ETHTOOL_OPS(dev, &network_ethtool_ops);
if ((err = register_netdev(dev)) != 0) {
printk(KERN_WARNING "%s> register_netdev err=%d\n", __FUNCTION__, err);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|