summaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net_ethtool.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2006-01-12 17:16:44 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-17 07:25:01 -0500
commit11f1a52b87eaf830bd03d4e01d563437c30f7728 (patch)
treef251162b093f1ac7153d17de8d046f16f3e2e17e /drivers/net/spider_net_ethtool.c
parent8e0a613bf61ccaab376877d7c2ed50315b8ca6d7 (diff)
downloadop-kernel-dev-11f1a52b87eaf830bd03d4e01d563437c30f7728.zip
op-kernel-dev-11f1a52b87eaf830bd03d4e01d563437c30f7728.tar.gz
[PATCH] spidernet: performance optimizations
Performance optimizations, changes in these areas: - RX and TX checksum offload - correct maximum MTU - don't use TX interrupts anymore, use a timer instead - remove some superfluous barriers - improve RX RAM full handling From: Utz Bacher <utz.bacher@de.ibm.com> Signed-off-by: Jens Osterkamp <jens.osterkamp@de.ibm.com> Signed-off-by: Arnd Bergmann <arndb@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/spider_net_ethtool.c')
-rw-r--r--drivers/net/spider_net_ethtool.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/spider_net_ethtool.c b/drivers/net/spider_net_ethtool.c
index d42e60b..a5bb0b76 100644
--- a/drivers/net/spider_net_ethtool.c
+++ b/drivers/net/spider_net_ethtool.c
@@ -113,6 +113,23 @@ spider_net_ethtool_set_rx_csum(struct net_device *netdev, u32 n)
return 0;
}
+static uint32_t
+spider_net_ethtool_get_tx_csum(struct net_device *netdev)
+{
+ return (netdev->features & NETIF_F_HW_CSUM) != 0;
+}
+
+static int
+spider_net_ethtool_set_tx_csum(struct net_device *netdev, uint32_t data)
+{
+ if (data)
+ netdev->features |= NETIF_F_HW_CSUM;
+ else
+ netdev->features &= ~NETIF_F_HW_CSUM;
+
+ return 0;
+}
+
struct ethtool_ops spider_net_ethtool_ops = {
.get_settings = spider_net_ethtool_get_settings,
.get_drvinfo = spider_net_ethtool_get_drvinfo,
@@ -122,5 +139,7 @@ struct ethtool_ops spider_net_ethtool_ops = {
.nway_reset = spider_net_ethtool_nway_reset,
.get_rx_csum = spider_net_ethtool_get_rx_csum,
.set_rx_csum = spider_net_ethtool_set_rx_csum,
+ .get_tx_csum = spider_net_ethtool_get_tx_csum,
+ .set_tx_csum = spider_net_ethtool_set_tx_csum,
};
OpenPOWER on IntegriCloud