diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-03-09 06:59:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-10 07:43:53 -0400 |
commit | 22bdd4f599b87734b7fc8137f47e62c13ab27e93 (patch) | |
tree | 1b066845992cb7f3c7151b8d9c93190e9e9dfc9a /drivers/net/qlge | |
parent | d555f5921f2b0d9f65b547dd0be67c870ff5a56f (diff) |
qlge: Add support for GRO.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 498d4bf52116..339e1da77e6e 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -1507,6 +1507,8 @@ static void ql_process_mac_rx_intr(struct ql_adapter *qdev, | |||
1507 | { | 1507 | { |
1508 | struct net_device *ndev = qdev->ndev; | 1508 | struct net_device *ndev = qdev->ndev; |
1509 | struct sk_buff *skb = NULL; | 1509 | struct sk_buff *skb = NULL; |
1510 | u16 vlan_id = (le16_to_cpu(ib_mac_rsp->vlan_id) & | ||
1511 | IB_MAC_IOCB_RSP_VLAN_MASK) | ||
1510 | 1512 | ||
1511 | QL_DUMP_IB_MAC_RSP(ib_mac_rsp); | 1513 | QL_DUMP_IB_MAC_RSP(ib_mac_rsp); |
1512 | 1514 | ||
@@ -1562,16 +1564,23 @@ static void ql_process_mac_rx_intr(struct ql_adapter *qdev, | |||
1562 | 1564 | ||
1563 | qdev->stats.rx_packets++; | 1565 | qdev->stats.rx_packets++; |
1564 | qdev->stats.rx_bytes += skb->len; | 1566 | qdev->stats.rx_bytes += skb->len; |
1565 | skb_record_rx_queue(skb, rx_ring - &qdev->rx_ring[0]); | 1567 | skb_record_rx_queue(skb, |
1566 | if (qdev->vlgrp && (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_V)) { | 1568 | rx_ring->cq_id - qdev->rss_ring_first_cq_id); |
1567 | QPRINTK(qdev, RX_STATUS, DEBUG, | 1569 | if (skb->ip_summed == CHECKSUM_UNNECESSARY) { |
1568 | "Passing a VLAN packet upstream.\n"); | 1570 | if (qdev->vlgrp && |
1569 | vlan_hwaccel_receive_skb(skb, qdev->vlgrp, | 1571 | (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_V) && |
1570 | le16_to_cpu(ib_mac_rsp->vlan_id)); | 1572 | (vlan_id != 0)) |
1573 | vlan_gro_receive(&rx_ring->napi, qdev->vlgrp, | ||
1574 | vlan_id, skb); | ||
1575 | else | ||
1576 | napi_gro_receive(&rx_ring->napi, skb); | ||
1571 | } else { | 1577 | } else { |
1572 | QPRINTK(qdev, RX_STATUS, DEBUG, | 1578 | if (qdev->vlgrp && |
1573 | "Passing a normal packet upstream.\n"); | 1579 | (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_V) && |
1574 | netif_receive_skb(skb); | 1580 | (vlan_id != 0)) |
1581 | vlan_hwaccel_receive_skb(skb, qdev->vlgrp, vlan_id); | ||
1582 | else | ||
1583 | netif_receive_skb(skb); | ||
1575 | } | 1584 | } |
1576 | } | 1585 | } |
1577 | 1586 | ||
@@ -1774,7 +1783,7 @@ static int ql_napi_poll_msix(struct napi_struct *napi, int budget) | |||
1774 | rx_ring->cq_id); | 1783 | rx_ring->cq_id); |
1775 | 1784 | ||
1776 | if (work_done < budget) { | 1785 | if (work_done < budget) { |
1777 | __napi_complete(napi); | 1786 | napi_complete(napi); |
1778 | ql_enable_completion_interrupt(qdev, rx_ring->irq); | 1787 | ql_enable_completion_interrupt(qdev, rx_ring->irq); |
1779 | } | 1788 | } |
1780 | return work_done; | 1789 | return work_done; |
@@ -3840,6 +3849,7 @@ static int __devinit qlge_probe(struct pci_dev *pdev, | |||
3840 | | NETIF_F_TSO_ECN | 3849 | | NETIF_F_TSO_ECN |
3841 | | NETIF_F_HW_VLAN_TX | 3850 | | NETIF_F_HW_VLAN_TX |
3842 | | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER); | 3851 | | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER); |
3852 | ndev->features |= NETIF_F_GRO; | ||
3843 | 3853 | ||
3844 | if (test_bit(QL_DMA64, &qdev->flags)) | 3854 | if (test_bit(QL_DMA64, &qdev->flags)) |
3845 | ndev->features |= NETIF_F_HIGHDMA; | 3855 | ndev->features |= NETIF_F_HIGHDMA; |