diff options
author | Auke Kok <auke\-jan.h.kok@intel.com> | 2006-11-01 11:47:36 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-02 00:11:58 -0500 |
commit | 87ca4e5b8d729fc157a0a599d78ccab245fc0602 (patch) | |
tree | 69bec3c1d367d26253678e6fbd9eff184c68e7ee /drivers/net/e1000/e1000_main.c | |
parent | b00dae7cce465323850c3e1fd3ac8b2d9229735c (diff) |
e1000: FIX: enable hw TSO for IPV6
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>
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 35d6d080522f..38ee39e570ea 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, | |||
844 | (adapter->hw.mac_type != e1000_82547)) | 844 | (adapter->hw.mac_type != e1000_82547)) |
845 | netdev->features |= NETIF_F_TSO; | 845 | netdev->features |= NETIF_F_TSO; |
846 | 846 | ||
847 | #ifdef NETIF_F_TSO_IPV6 | 847 | #ifdef NETIF_F_TSO6 |
848 | if (adapter->hw.mac_type > e1000_82547_rev_2) | 848 | if (adapter->hw.mac_type > e1000_82547_rev_2) |
849 | netdev->features |= NETIF_F_TSO_IPV6; | 849 | netdev->features |= NETIF_F_TSO6; |
850 | #endif | 850 | #endif |
851 | #endif | 851 | #endif |
852 | if (pci_using_dac) | 852 | if (pci_using_dac) |
@@ -1814,8 +1814,11 @@ e1000_setup_rctl(struct e1000_adapter *adapter) | |||
1814 | /* Configure extra packet-split registers */ | 1814 | /* Configure extra packet-split registers */ |
1815 | rfctl = E1000_READ_REG(&adapter->hw, RFCTL); | 1815 | rfctl = E1000_READ_REG(&adapter->hw, RFCTL); |
1816 | rfctl |= E1000_RFCTL_EXTEN; | 1816 | rfctl |= E1000_RFCTL_EXTEN; |
1817 | /* disable IPv6 packet split support */ | 1817 | /* disable packet split support for IPv6 extension headers, |
1818 | rfctl |= E1000_RFCTL_IPV6_DIS; | 1818 | * because some malformed IPv6 headers can hang the RX */ |
1819 | rfctl |= (E1000_RFCTL_IPV6_EX_DIS | | ||
1820 | E1000_RFCTL_NEW_IPV6_EXT_DIS); | ||
1821 | |||
1819 | E1000_WRITE_REG(&adapter->hw, RFCTL, rfctl); | 1822 | E1000_WRITE_REG(&adapter->hw, RFCTL, rfctl); |
1820 | 1823 | ||
1821 | rctl |= E1000_RCTL_DTYP_PS; | 1824 | rctl |= E1000_RCTL_DTYP_PS; |
@@ -2473,9 +2476,15 @@ e1000_watchdog(unsigned long data) | |||
2473 | DPRINTK(PROBE,INFO, | 2476 | DPRINTK(PROBE,INFO, |
2474 | "10/100 speed: disabling TSO\n"); | 2477 | "10/100 speed: disabling TSO\n"); |
2475 | netdev->features &= ~NETIF_F_TSO; | 2478 | netdev->features &= ~NETIF_F_TSO; |
2479 | #ifdef NETIF_F_TSO6 | ||
2480 | netdev->features &= ~NETIF_F_TSO6; | ||
2481 | #endif | ||
2476 | break; | 2482 | break; |
2477 | case SPEED_1000: | 2483 | case SPEED_1000: |
2478 | netdev->features |= NETIF_F_TSO; | 2484 | netdev->features |= NETIF_F_TSO; |
2485 | #ifdef NETIF_F_TSO6 | ||
2486 | netdev->features |= NETIF_F_TSO6; | ||
2487 | #endif | ||
2479 | break; | 2488 | break; |
2480 | default: | 2489 | default: |
2481 | /* oops */ | 2490 | /* oops */ |
@@ -2610,7 +2619,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2610 | 0); | 2619 | 0); |
2611 | cmd_length = E1000_TXD_CMD_IP; | 2620 | cmd_length = E1000_TXD_CMD_IP; |
2612 | ipcse = skb->h.raw - skb->data - 1; | 2621 | ipcse = skb->h.raw - skb->data - 1; |
2613 | #ifdef NETIF_F_TSO_IPV6 | 2622 | #ifdef NETIF_F_TSO6 |
2614 | } else if (skb->protocol == htons(ETH_P_IPV6)) { | 2623 | } else if (skb->protocol == htons(ETH_P_IPV6)) { |
2615 | skb->nh.ipv6h->payload_len = 0; | 2624 | skb->nh.ipv6h->payload_len = 0; |
2616 | skb->h.th->check = | 2625 | skb->h.th->check = |