From patchwork Thu Apr 1 11:49:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Kravkov X-Patchwork-Id: 49207 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3F10BB7D08 for ; Thu, 1 Apr 2010 22:49:54 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755685Ab0DALts (ORCPT ); Thu, 1 Apr 2010 07:49:48 -0400 Received: from mms1.broadcom.com ([216.31.210.17]:1493 "EHLO mms1.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755644Ab0DALtq convert rfc822-to-8bit (ORCPT ); Thu, 1 Apr 2010 07:49:46 -0400 Received: from [10.9.200.131] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Thu, 01 Apr 2010 04:49:37 -0700 X-Server-Uuid: 02CED230-5797-4B57-9875-D5D2FEE4708A Received: from mail-irva-12.broadcom.com (10.11.16.101) by IRVEXCHHUB01.corp.ad.broadcom.com (10.9.200.131) with Microsoft SMTP Server id 8.2.247.2; Thu, 1 Apr 2010 04:49:37 -0700 Received: from [10.185.7.55] (lb-tlvb-dmitry.il.broadcom.com [10.185.7.55]) by mail-irva-12.broadcom.com (Postfix) with ESMTP id 9E0D869CA8; Thu, 1 Apr 2010 04:49:35 -0700 (PDT) Subject: [PATCH net-next] bnx2x: Added GRO support From: "Dmitry Kravkov" To: davem@davemloft.net cc: netdev@vger.kernel.org, eilong@broadcom.com, vladz@broadcom.com Date: Thu, 1 Apr 2010 14:49:33 +0300 Message-ID: <1270122573.22693.6.camel@lb-tlvb-dmitry> MIME-Version: 1.0 X-Mailer: Evolution 2.28.1 X-WSS-ID: 67AA57DB20S76574445-01-01 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Resend, since original mail has typo in Dave's address --- 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 Signed-off-by: Eilon Greenstein --- drivers/net/bnx2x_main.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 6c042a7..f4ea99d 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -57,8 +57,8 @@ #include "bnx2x_init_ops.h" #include "bnx2x_dump.h" -#define DRV_MODULE_VERSION "1.52.1-7" -#define DRV_MODULE_RELDATE "2010/02/28" +#define DRV_MODULE_VERSION "1.52.1-8" +#define DRV_MODULE_RELDATE "2010/04/01" #define BNX2X_BC_VER 0x040200 #include @@ -1441,12 +1441,12 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, #ifdef BCM_VLAN if ((bp->vlgrp != NULL) && is_vlan_cqe && (!is_not_hwaccel_vlan_cqe)) - vlan_hwaccel_receive_skb(skb, bp->vlgrp, - le16_to_cpu(cqe->fast_path_cqe. - vlan_tag)); + vlan_gro_receive(&fp->napi, bp->vlgrp, + le16_to_cpu(cqe->fast_path_cqe. + vlan_tag), skb); else #endif - netif_receive_skb(skb); + napi_gro_receive(&fp->napi, skb); } else { DP(NETIF_MSG_RX_STATUS, "Failed to allocate new pages" " - dropping packet!\n"); @@ -1699,11 +1699,11 @@ reuse_rx: if ((bp->vlgrp != NULL) && (bp->flags & HW_VLAN_RX_FLAG) && (le16_to_cpu(cqe->fast_path_cqe.pars_flags.flags) & PARSING_FLAGS_VLAN)) - vlan_hwaccel_receive_skb(skb, bp->vlgrp, - le16_to_cpu(cqe->fast_path_cqe.vlan_tag)); + vlan_gro_receive(&fp->napi, bp->vlgrp, + le16_to_cpu(cqe->fast_path_cqe.vlan_tag), skb); else #endif - netif_receive_skb(skb); + napi_gro_receive(&fp->napi, skb); next_rx: @@ -8935,6 +8935,8 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp) bp->multi_mode = multi_mode; + bp->dev->features |= NETIF_F_GRO; + /* Set TPA flags */ if (disable_tpa) { bp->flags &= ~TPA_ENABLE_FLAG;