lkml.org 
[lkml]   [2006]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Allow TSO to be disabled for forcedeth driver
TSO can cause performance problems in certain environments, and being 
able to turn it on or off is helpful for debugging network issues. Most
other network drivers that support TSO allow it to be toggled, so add
this feature to forcedeth. Tested by Harald Dunkel, who reported that
this fixed his network performance issue with VMware.


Implement get / set tso for forcedeth driver.

Signed-off-by: Zachary Amsden <zach@vmware.com>

Index: linux-2.6.17-rc/drivers/net/forcedeth.c
===================================================================
--- linux-2.6.17-rc.orig/drivers/net/forcedeth.c 2006-05-18 13:31:55.000000000 -0700
+++ linux-2.6.17-rc/drivers/net/forcedeth.c 2006-05-31 14:34:53.000000000 -0700
@@ -2615,6 +2615,21 @@ static int nv_nway_reset(struct net_devi
return ret;
}

+static int nv_set_tso(struct net_device *dev, u32 value)
+{
+ struct fe_priv *np = netdev_priv(dev);
+ int ret;
+
+ spin_lock_irq(&np->lock);
+ if ((np->driver_data & DEV_HAS_CHECKSUM))
+ ret = ethtool_op_set_tso(dev, value);
+ else
+ ret = value ? -EOPNOTSUPP : 0;
+ spin_unlock_irq(&np->lock);
+
+ return ret;
+}
+
static struct ethtool_ops ops = {
.get_drvinfo = nv_get_drvinfo,
.get_link = ethtool_op_get_link,
@@ -2626,6 +2641,8 @@ static struct ethtool_ops ops = {
.get_regs = nv_get_regs,
.nway_reset = nv_nway_reset,
.get_perm_addr = ethtool_op_get_perm_addr,
+ .get_tso = ethtool_op_get_tso,
+ .set_tso = nv_set_tso
};

static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
\
 
 \ /
  Last update: 2006-06-01 21:30    [W:1.103 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site