aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2010-04-01 22:45:34 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-01 22:45:34 -0400
commit4fd89b7af28292e190650b9b9bc4308658d81dd1 (patch)
tree755a77dbb7e678f4a5f68338ee22d39adca25502
parentd7997fe1f4584da12e9c29fb682c18e9bdc13b73 (diff)
bnx2x: Added GRO support
Adding GRO support on top of the HW LRO (TPA) support – there is no measurable performance drawback of adding GRO on top of it, and it allows better performance when LRO (TPA) is turned off for virtualization or bridging. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bnx2x_main.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 6c042a72d6cc..f4ea99d06c77 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -57,8 +57,8 @@
57#include "bnx2x_init_ops.h" 57#include "bnx2x_init_ops.h"
58#include "bnx2x_dump.h" 58#include "bnx2x_dump.h"
59 59
60#define DRV_MODULE_VERSION "1.52.1-7" 60#define DRV_MODULE_VERSION "1.52.1-8"
61#define DRV_MODULE_RELDATE "2010/02/28" 61#define DRV_MODULE_RELDATE "2010/04/01"
62#define BNX2X_BC_VER 0x040200 62#define BNX2X_BC_VER 0x040200
63 63
64#include <linux/firmware.h> 64#include <linux/firmware.h>
@@ -1441,12 +1441,12 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp,
1441#ifdef BCM_VLAN 1441#ifdef BCM_VLAN
1442 if ((bp->vlgrp != NULL) && is_vlan_cqe && 1442 if ((bp->vlgrp != NULL) && is_vlan_cqe &&
1443 (!is_not_hwaccel_vlan_cqe)) 1443 (!is_not_hwaccel_vlan_cqe))
1444 vlan_hwaccel_receive_skb(skb, bp->vlgrp, 1444 vlan_gro_receive(&fp->napi, bp->vlgrp,
1445 le16_to_cpu(cqe->fast_path_cqe. 1445 le16_to_cpu(cqe->fast_path_cqe.
1446 vlan_tag)); 1446 vlan_tag), skb);
1447 else 1447 else
1448#endif 1448#endif
1449 netif_receive_skb(skb); 1449 napi_gro_receive(&fp->napi, skb);
1450 } else { 1450 } else {
1451 DP(NETIF_MSG_RX_STATUS, "Failed to allocate new pages" 1451 DP(NETIF_MSG_RX_STATUS, "Failed to allocate new pages"
1452 " - dropping packet!\n"); 1452 " - dropping packet!\n");
@@ -1699,11 +1699,11 @@ reuse_rx:
1699 if ((bp->vlgrp != NULL) && (bp->flags & HW_VLAN_RX_FLAG) && 1699 if ((bp->vlgrp != NULL) && (bp->flags & HW_VLAN_RX_FLAG) &&
1700 (le16_to_cpu(cqe->fast_path_cqe.pars_flags.flags) & 1700 (le16_to_cpu(cqe->fast_path_cqe.pars_flags.flags) &
1701 PARSING_FLAGS_VLAN)) 1701 PARSING_FLAGS_VLAN))
1702 vlan_hwaccel_receive_skb(skb, bp->vlgrp, 1702 vlan_gro_receive(&fp->napi, bp->vlgrp,
1703 le16_to_cpu(cqe->fast_path_cqe.vlan_tag)); 1703 le16_to_cpu(cqe->fast_path_cqe.vlan_tag), skb);
1704 else 1704 else
1705#endif 1705#endif
1706 netif_receive_skb(skb); 1706 napi_gro_receive(&fp->napi, skb);
1707 1707
1708 1708
1709next_rx: 1709next_rx:
@@ -8935,6 +8935,8 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)
8935 bp->multi_mode = multi_mode; 8935 bp->multi_mode = multi_mode;
8936 8936
8937 8937
8938 bp->dev->features |= NETIF_F_GRO;
8939
8938 /* Set TPA flags */ 8940 /* Set TPA flags */
8939 if (disable_tpa) { 8941 if (disable_tpa) {
8940 bp->flags &= ~TPA_ENABLE_FLAG; 8942 bp->flags &= ~TPA_ENABLE_FLAG;