From patchwork Wed Jun 4 18:19:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 4296411 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DC9B9BEEAA for ; Wed, 4 Jun 2014 18:22:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0D0F4201D5 for ; Wed, 4 Jun 2014 18:22:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F9DA20254 for ; Wed, 4 Jun 2014 18:22:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751049AbaFDSWM (ORCPT ); Wed, 4 Jun 2014 14:22:12 -0400 Received: from cmexedge2.ext.emulex.com ([138.239.224.100]:14161 "EHLO CMEXEDGE2.ext.emulex.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751209AbaFDSWL (ORCPT ); Wed, 4 Jun 2014 14:22:11 -0400 Received: from CMEXHTCAS1.ad.emulex.com (138.239.115.217) by CMEXEDGE2.ext.emulex.com (138.239.224.100) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 4 Jun 2014 11:23:00 -0700 Received: from localhost.localdomain (10.192.201.1) by smtp.emulex.com (138.239.115.207) with Microsoft SMTP Server id 14.3.174.1; Wed, 4 Jun 2014 11:22:08 -0700 From: Selvin Xavier To: CC: , Selvin Xavier , "Devesh Sharma" Subject: [PATCH for-next 13/15] RDMA/ocrdma: Increase the size of STAG array in dev structure to 16K Date: Wed, 4 Jun 2014 23:49:13 +0530 X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1401905955-28117-13-git-send-email-selvin.xavier@emulex.com> References: <1401905955-28117-1-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-2-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-3-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-4-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-5-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-6-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-7-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-8-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-9-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-10-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-11-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-12-git-send-email-selvin.xavier@emulex.com> <1401905955-28117-13-git-send-email-selvin.xavier@emulex.com> MIME-Version: 1.0 Message-ID: <21544437-9eea-4a25-a60f-24249c8d8aca@CMEXHTCAS1.ad.emulex.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/ocrdma/ocrdma.h | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 6 ++++++ drivers/infiniband/hw/ocrdma/ocrdma_sli.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma.h b/drivers/infiniband/hw/ocrdma/ocrdma.h index fc27378..5716513 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma.h +++ b/drivers/infiniband/hw/ocrdma/ocrdma.h @@ -236,7 +236,7 @@ struct ocrdma_dev { struct list_head entry; struct rcu_head rcu; int id; - u64 stag_arr[OCRDMA_MAX_STAG]; + u64 *stag_arr; u8 sl; /* service level */ bool pfc_state; atomic_t update_sl; diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index 3cb20c6..0d90c7f 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c @@ -324,6 +324,11 @@ static int ocrdma_alloc_resources(struct ocrdma_dev *dev) if (!dev->qp_tbl) goto alloc_err; } + + dev->stag_arr = kzalloc(sizeof(u64) * OCRDMA_MAX_STAG, GFP_KERNEL); + if (dev->stag_arr == NULL) + goto alloc_err; + spin_lock_init(&dev->av_tbl.lock); spin_lock_init(&dev->flush_q_lock); return 0; @@ -334,6 +339,7 @@ alloc_err: static void ocrdma_free_resources(struct ocrdma_dev *dev) { + kfree(dev->stag_arr); kfree(dev->qp_tbl); kfree(dev->cq_tbl); kfree(dev->sgid_tbl); diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_sli.h b/drivers/infiniband/hw/ocrdma/ocrdma_sli.h index a20d348..3d08e66 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_sli.h +++ b/drivers/infiniband/hw/ocrdma/ocrdma_sli.h @@ -107,7 +107,7 @@ enum { #define OCRDMA_MAX_QP 2048 #define OCRDMA_MAX_CQ 2048 -#define OCRDMA_MAX_STAG 8192 +#define OCRDMA_MAX_STAG 16384 enum { OCRDMA_DB_RQ_OFFSET = 0xE0,