diff options
author | Arnd Bergmann <arnd@arndb.de> | 2006-01-12 17:16:44 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 07:25:01 -0500 |
commit | 11f1a52b87eaf830bd03d4e01d563437c30f7728 (patch) | |
tree | f251162b093f1ac7153d17de8d046f16f3e2e17e /drivers/net/spider_net_ethtool.c | |
parent | 8e0a613bf61ccaab376877d7c2ed50315b8ca6d7 (diff) |
[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.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/spider_net_ethtool.c b/drivers/net/spider_net_ethtool.c index d42e60ba74ce..a5bb0b7633af 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) | |||
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | static uint32_t | ||
117 | spider_net_ethtool_get_tx_csum(struct net_device *netdev) | ||
118 | { | ||
119 | return (netdev->features & NETIF_F_HW_CSUM) != 0; | ||
120 | } | ||
121 | |||
122 | static int | ||
123 | spider_net_ethtool_set_tx_csum(struct net_device *netdev, uint32_t data) | ||
124 | { | ||
125 | if (data) | ||
126 | netdev->features |= NETIF_F_HW_CSUM; | ||
127 | else | ||
128 | netdev->features &= ~NETIF_F_HW_CSUM; | ||
129 | |||
130 | return 0; | ||
131 | } | ||
132 | |||
116 | struct ethtool_ops spider_net_ethtool_ops = { | 133 | struct ethtool_ops spider_net_ethtool_ops = { |
117 | .get_settings = spider_net_ethtool_get_settings, | 134 | .get_settings = spider_net_ethtool_get_settings, |
118 | .get_drvinfo = spider_net_ethtool_get_drvinfo, | 135 | .get_drvinfo = spider_net_ethtool_get_drvinfo, |
@@ -122,5 +139,7 @@ struct ethtool_ops spider_net_ethtool_ops = { | |||
122 | .nway_reset = spider_net_ethtool_nway_reset, | 139 | .nway_reset = spider_net_ethtool_nway_reset, |
123 | .get_rx_csum = spider_net_ethtool_get_rx_csum, | 140 | .get_rx_csum = spider_net_ethtool_get_rx_csum, |
124 | .set_rx_csum = spider_net_ethtool_set_rx_csum, | 141 | .set_rx_csum = spider_net_ethtool_set_rx_csum, |
142 | .get_tx_csum = spider_net_ethtool_get_tx_csum, | ||
143 | .set_tx_csum = spider_net_ethtool_set_tx_csum, | ||
125 | }; | 144 | }; |
126 | 145 | ||