Commit 4fd89b7a authored by Dmitry Kravkov's avatar Dmitry Kravkov Committed by David S. Miller

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: default avatarDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d7997fe1
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
#include "bnx2x_init_ops.h" #include "bnx2x_init_ops.h"
#include "bnx2x_dump.h" #include "bnx2x_dump.h"
#define DRV_MODULE_VERSION "1.52.1-7" #define DRV_MODULE_VERSION "1.52.1-8"
#define DRV_MODULE_RELDATE "2010/02/28" #define DRV_MODULE_RELDATE "2010/04/01"
#define BNX2X_BC_VER 0x040200 #define BNX2X_BC_VER 0x040200
#include <linux/firmware.h> #include <linux/firmware.h>
...@@ -1441,12 +1441,12 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, ...@@ -1441,12 +1441,12 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp,
#ifdef BCM_VLAN #ifdef BCM_VLAN
if ((bp->vlgrp != NULL) && is_vlan_cqe && if ((bp->vlgrp != NULL) && is_vlan_cqe &&
(!is_not_hwaccel_vlan_cqe)) (!is_not_hwaccel_vlan_cqe))
vlan_hwaccel_receive_skb(skb, bp->vlgrp, vlan_gro_receive(&fp->napi, bp->vlgrp,
le16_to_cpu(cqe->fast_path_cqe. le16_to_cpu(cqe->fast_path_cqe.
vlan_tag)); vlan_tag), skb);
else else
#endif #endif
netif_receive_skb(skb); napi_gro_receive(&fp->napi, skb);
} else { } else {
DP(NETIF_MSG_RX_STATUS, "Failed to allocate new pages" DP(NETIF_MSG_RX_STATUS, "Failed to allocate new pages"
" - dropping packet!\n"); " - dropping packet!\n");
...@@ -1699,11 +1699,11 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget) ...@@ -1699,11 +1699,11 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
if ((bp->vlgrp != NULL) && (bp->flags & HW_VLAN_RX_FLAG) && if ((bp->vlgrp != NULL) && (bp->flags & HW_VLAN_RX_FLAG) &&
(le16_to_cpu(cqe->fast_path_cqe.pars_flags.flags) & (le16_to_cpu(cqe->fast_path_cqe.pars_flags.flags) &
PARSING_FLAGS_VLAN)) PARSING_FLAGS_VLAN))
vlan_hwaccel_receive_skb(skb, bp->vlgrp, vlan_gro_receive(&fp->napi, bp->vlgrp,
le16_to_cpu(cqe->fast_path_cqe.vlan_tag)); le16_to_cpu(cqe->fast_path_cqe.vlan_tag), skb);
else else
#endif #endif
netif_receive_skb(skb); napi_gro_receive(&fp->napi, skb);
next_rx: next_rx:
...@@ -8935,6 +8935,8 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp) ...@@ -8935,6 +8935,8 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)
bp->multi_mode = multi_mode; bp->multi_mode = multi_mode;
bp->dev->features |= NETIF_F_GRO;
/* Set TPA flags */ /* Set TPA flags */
if (disable_tpa) { if (disable_tpa) {
bp->flags &= ~TPA_ENABLE_FLAG; bp->flags &= ~TPA_ENABLE_FLAG;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment