diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2008-08-26 07:27:24 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-03 10:03:34 -0400 |
commit | e9990a9cd76a14905a8bf2348444ff775b24a92f (patch) | |
tree | af38d8c801176258d57c9d4d9bc78ce34be68bfa /drivers/net/ixgbe/ixgbe_main.c | |
parent | 96b0e0f63b03153f7f2915f584083b4191b1932d (diff) |
ixgbe: fix bug where lro settings are per ring
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index f37e3eb12f7c..6b96c41687df 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1428,8 +1428,8 @@ static int ixgbe_get_skb_hdr(struct sk_buff *skb, void **iphdr, void **tcph, | |||
1428 | union ixgbe_adv_rx_desc *rx_desc = priv; | 1428 | union ixgbe_adv_rx_desc *rx_desc = priv; |
1429 | 1429 | ||
1430 | /* Verify that this is a valid IPv4 TCP packet */ | 1430 | /* Verify that this is a valid IPv4 TCP packet */ |
1431 | if (!(ixgbe_get_pkt_info(rx_desc) & | 1431 | if (!((ixgbe_get_pkt_info(rx_desc) & IXGBE_RXDADV_PKTTYPE_IPV4) && |
1432 | (IXGBE_RXDADV_PKTTYPE_IPV4 | IXGBE_RXDADV_PKTTYPE_TCP))) | 1432 | (ixgbe_get_pkt_info(rx_desc) & IXGBE_RXDADV_PKTTYPE_TCP))) |
1433 | return -1; | 1433 | return -1; |
1434 | 1434 | ||
1435 | /* Set network headers */ | 1435 | /* Set network headers */ |
@@ -1532,18 +1532,18 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) | |||
1532 | adapter->rx_ring[i].head = IXGBE_RDH(j); | 1532 | adapter->rx_ring[i].head = IXGBE_RDH(j); |
1533 | adapter->rx_ring[i].tail = IXGBE_RDT(j); | 1533 | adapter->rx_ring[i].tail = IXGBE_RDT(j); |
1534 | adapter->rx_ring[i].rx_buf_len = rx_buf_len; | 1534 | adapter->rx_ring[i].rx_buf_len = rx_buf_len; |
1535 | /* Intitial LRO Settings */ | ||
1536 | adapter->rx_ring[i].lro_mgr.max_aggr = IXGBE_MAX_LRO_AGGREGATE; | ||
1537 | adapter->rx_ring[i].lro_mgr.max_desc = IXGBE_MAX_LRO_DESCRIPTORS; | ||
1538 | adapter->rx_ring[i].lro_mgr.get_skb_header = ixgbe_get_skb_hdr; | ||
1539 | adapter->rx_ring[i].lro_mgr.features = LRO_F_EXTRACT_VLAN_ID; | ||
1540 | if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) | ||
1541 | adapter->rx_ring[i].lro_mgr.features |= LRO_F_NAPI; | ||
1542 | adapter->rx_ring[i].lro_mgr.dev = adapter->netdev; | ||
1543 | adapter->rx_ring[i].lro_mgr.ip_summed = CHECKSUM_UNNECESSARY; | ||
1544 | adapter->rx_ring[i].lro_mgr.ip_summed_aggr = CHECKSUM_UNNECESSARY; | ||
1535 | } | 1545 | } |
1536 | 1546 | ||
1537 | /* Intitial LRO Settings */ | ||
1538 | adapter->rx_ring[i].lro_mgr.max_aggr = IXGBE_MAX_LRO_AGGREGATE; | ||
1539 | adapter->rx_ring[i].lro_mgr.max_desc = IXGBE_MAX_LRO_DESCRIPTORS; | ||
1540 | adapter->rx_ring[i].lro_mgr.get_skb_header = ixgbe_get_skb_hdr; | ||
1541 | adapter->rx_ring[i].lro_mgr.features = LRO_F_EXTRACT_VLAN_ID; | ||
1542 | if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) | ||
1543 | adapter->rx_ring[i].lro_mgr.features |= LRO_F_NAPI; | ||
1544 | adapter->rx_ring[i].lro_mgr.dev = adapter->netdev; | ||
1545 | adapter->rx_ring[i].lro_mgr.ip_summed = CHECKSUM_UNNECESSARY; | ||
1546 | adapter->rx_ring[i].lro_mgr.ip_summed_aggr = CHECKSUM_UNNECESSARY; | ||
1547 | 1547 | ||
1548 | if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { | 1548 | if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { |
1549 | /* Fill out redirection table */ | 1549 | /* Fill out redirection table */ |
@@ -3618,9 +3618,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
3618 | NETIF_F_HW_VLAN_RX | | 3618 | NETIF_F_HW_VLAN_RX | |
3619 | NETIF_F_HW_VLAN_FILTER; | 3619 | NETIF_F_HW_VLAN_FILTER; |
3620 | 3620 | ||
3621 | netdev->features |= NETIF_F_LRO; | 3621 | netdev->features |= NETIF_F_IPV6_CSUM; |
3622 | netdev->features |= NETIF_F_TSO; | 3622 | netdev->features |= NETIF_F_TSO; |
3623 | netdev->features |= NETIF_F_TSO6; | 3623 | netdev->features |= NETIF_F_TSO6; |
3624 | netdev->features |= NETIF_F_LRO; | ||
3624 | 3625 | ||
3625 | netdev->vlan_features |= NETIF_F_TSO; | 3626 | netdev->vlan_features |= NETIF_F_TSO; |
3626 | netdev->vlan_features |= NETIF_F_TSO6; | 3627 | netdev->vlan_features |= NETIF_F_TSO6; |