From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: "Garzik, Jeff" <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org, "Brandeburg,
Jesse" <jesse.brandeburg@intel.com>,
"Kok, Auke" <auke-jan.h.kok@intel.com>,
"Kok, Auke" <auke@foo-projects.org>,
"Ronciak, John" <john.ronciak@intel.com>
Subject: [PATCH 03/18] e1000: FIX: enable hw TSO for IPV6
Date: Wed, 01 Nov 2006 09:51:35 -0800 [thread overview]
Message-ID: <20061101175135.2356.61105.stgit@gitlost.site> (raw)
In-Reply-To: <20061101175043.2356.13659.stgit@gitlost.site>
Enable TSO for IPV6. All e1000 hardware supports it. This reduces CPU
utilizations by 50% when transmitting IPv6 frames.
Fix symbol naming enabling ipv6 TSO. Turn off TSO6 for 10/100.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000/e1000.h | 3 +++
drivers/net/e1000/e1000_ethtool.c | 7 +++++++
drivers/net/e1000/e1000_main.c | 19 ++++++++++++++-----
3 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 7ecce43..3f0be02 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -59,6 +59,9 @@
#include <linux/capability.h>
#include <linux/in.h>
#include <linux/ip.h>
+#ifdef NETIF_F_TSO6
+#include <linux/ipv6.h>
+#endif
#include <linux/tcp.h>
#include <linux/udp.h>
#include <net/pkt_sched.h>
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 82d2c78..b9c0927 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -348,6 +348,13 @@ e1000_set_tso(struct net_device *netdev,
else
netdev->features &= ~NETIF_F_TSO;
+#ifdef NETIF_F_TSO6
+ if (data)
+ netdev->features |= NETIF_F_TSO6;
+ else
+ netdev->features &= ~NETIF_F_TSO6;
+#endif
+
DPRINTK(PROBE, INFO, "TSO is %s\n", data ? "Enabled" : "Disabled");
adapter->tso_force = TRUE;
return 0;
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index d3224c8..1e1198b 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -844,9 +844,9 @@ e1000_probe(struct pci_dev *pdev,
(adapter->hw.mac_type != e1000_82547))
netdev->features |= NETIF_F_TSO;
-#ifdef NETIF_F_TSO_IPV6
+#ifdef NETIF_F_TSO6
if (adapter->hw.mac_type > e1000_82547_rev_2)
- netdev->features |= NETIF_F_TSO_IPV6;
+ netdev->features |= NETIF_F_TSO6;
#endif
#endif
if (pci_using_dac)
@@ -1814,8 +1814,11 @@ e1000_setup_rctl(struct e1000_adapter *a
/* Configure extra packet-split registers */
rfctl = E1000_READ_REG(&adapter->hw, RFCTL);
rfctl |= E1000_RFCTL_EXTEN;
- /* disable IPv6 packet split support */
- rfctl |= E1000_RFCTL_IPV6_DIS;
+ /* disable packet split support for IPv6 extension headers,
+ * because some malformed IPv6 headers can hang the RX */
+ rfctl |= (E1000_RFCTL_IPV6_EX_DIS |
+ E1000_RFCTL_NEW_IPV6_EXT_DIS);
+
E1000_WRITE_REG(&adapter->hw, RFCTL, rfctl);
rctl |= E1000_RCTL_DTYP_PS;
@@ -2473,9 +2476,15 @@ e1000_watchdog(unsigned long data)
DPRINTK(PROBE,INFO,
"10/100 speed: disabling TSO\n");
netdev->features &= ~NETIF_F_TSO;
+#ifdef NETIF_F_TSO6
+ netdev->features &= ~NETIF_F_TSO6;
+#endif
break;
case SPEED_1000:
netdev->features |= NETIF_F_TSO;
+#ifdef NETIF_F_TSO6
+ netdev->features |= NETIF_F_TSO6;
+#endif
break;
default:
/* oops */
@@ -2610,7 +2619,7 @@ e1000_tso(struct e1000_adapter *adapter,
0);
cmd_length = E1000_TXD_CMD_IP;
ipcse = skb->h.raw - skb->data - 1;
-#ifdef NETIF_F_TSO_IPV6
+#ifdef NETIF_F_TSO6
} else if (skb->protocol == htons(ETH_P_IPV6)) {
skb->nh.ipv6h->payload_len = 0;
skb->h.th->check =
---
Auke Kok <auke-jan.h.kok@intel.com>
next prev parent reply other threads:[~2006-11-01 17:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-01 17:50 [PATCH 00/18] e1000: features, updates, documentation Kok, Auke
2006-11-01 17:51 ` [PATCH 01/18] e1000: whitespace changes, comments, typos Kok, Auke
2006-11-01 17:51 ` [PATCH 02/18] e1000: Remove DISABLE_MULR debug code Kok, Auke
2006-11-01 17:51 ` Kok, Auke [this message]
2006-11-01 17:51 ` [PATCH 04/18] e1000: Enble early receive (ERT) on 82573 Kok, Auke
2006-11-01 17:51 ` [PATCH 05/18] e1000: add mmiowb() for IA64 to sync tail writes Kok, Auke
2006-11-01 17:51 ` [PATCH 06/18] e1000: fix VR powerdown code Kok, Auke
2006-11-01 17:51 ` [PATCH 07/18] e1000: reorder pci-e infor struct Kok, Auke
2006-11-01 17:51 ` [PATCH 08/18] e1000: simplify skb_put call Kok, Auke
2006-11-01 17:51 ` [PATCH 09/18] e1000: Remove unneeded and unwanted memsets Kok, Auke
2006-11-01 17:51 ` [PATCH 10/18] e1000: New hardware support Kok, Auke
2006-11-01 17:51 ` [PATCH 11/18] e1000: add queue restart counter Kok, Auke
2006-11-01 17:51 ` [PATCH 12/18] e1000: rename ICH8 flash macros Kok, Auke
2006-11-01 17:51 ` [PATCH 13/18] e1000: Only set IDE for tx when we are using TIDV/TADV Kok, Auke
2006-11-01 17:52 ` [PATCH 14/18] e1000: reorder e1000_param.c Kok, Auke
2006-11-01 17:52 ` [PATCH 15/18] e1000: add dynamic generic MSI interrupt routine Kok, Auke
2006-11-01 17:52 ` [PATCH 16/18] e1000: add dynamic itr modes Kok, Auke
2006-11-01 17:52 ` [PATCH 17/18] e1000: increment version to 7.3.15-k2 Kok, Auke
2006-11-01 17:52 ` [PATCH 18/18] e1000: update README for e1000 Kok, Auke
2006-11-06 8:08 ` [PATCH 00/18] e1000: features, updates, documentation Jeff Garzik
2006-11-06 15:23 ` Auke Kok
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061101175135.2356.61105.stgit@gitlost.site \
--to=auke-jan.h.kok@intel.com \
--cc=auke@foo-projects.org \
--cc=jesse.brandeburg@intel.com \
--cc=jgarzik@pobox.com \
--cc=john.ronciak@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).