Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp31341pxk; Tue, 15 Sep 2020 16:54:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDSfWOEexP/4REusnofKvybRH0tteexBpG5uFl+bZvNlSPsrWJQjoGmaVe8wygaBwMGKFh X-Received: by 2002:a17:907:2115:: with SMTP id qn21mr22237589ejb.278.1600214070806; Tue, 15 Sep 2020 16:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600214070; cv=none; d=google.com; s=arc-20160816; b=vulCnVQdXh6l7JVBmEWvZ8+jGHwTdwvbs8wVmVnwRplvfZYY+5t9ucBPDVIQLwcLuL VkRnZQDvSoCUxoc+5bKDmRI4WmdISRtH9wUqxYzJR4j5uyQQDGQ91Uy1iHP4gbAiZnK0 9NJbyuuy81mB3rz0+OmiCFtet209E3LmBUrHFQ4Ee08M5PSb/kaKh8/Tsg6AN88bCnEy CukEKvz1qNYioQ2F5Jg4W0QTRo3q7F35Wyv5y/i4h39H7gaHhgPpO8h9AM8OSDbZVhgt cUi0AHHe+dXiQGA7GnkzH7JI2lXrz34PfqYM+7on/0RYCN9sns1qthOiWIB+ahHH489y Kw7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=71eMVmJB13LSM6Utko8I5+kc/W8oNDYOYfHX5c+aik0=; b=mkgeyA0JIy+MJVo63JRJpVEzp3bXTqvlDRZ+By+Er7n54bQsIhsJmqGhml+j/n0XDm Sx0bA5/Arp6oWGn02qzMUTu6ADbKJ0jtdBtZcb2Wjb+f2FQx1vgNOtC1sM3zF5/8IDHX TP0EHSFAbhL2OHyPYZYPkgcJRI7znG7KrnTylKk76mEdLxZiiFYNiYSqvS26Gg4uGChc V1T3nC1PN3YTI5DtFfEgldT+/mY/0fjx5LvT80qlEmMZWJLso2rgm8VOE+RjsmNCK0QR XQmJSRBOn13w8YmaSs0wIQsbJn9ShivW5Ub0G3p4p8gCvTfpwnW9vDmMlHkPWcm4nkV8 OZZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K6EPVtI9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m13si6104040edi.602.2020.09.15.16.54.05; Tue, 15 Sep 2020 16:54:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K6EPVtI9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727212AbgIOXuX (ORCPT + 99 others); Tue, 15 Sep 2020 19:50:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:47672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727098AbgIOOcm (ORCPT ); Tue, 15 Sep 2020 10:32:42 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 57C5D23BDE; Tue, 15 Sep 2020 14:24:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600179876; bh=hHoLGgiAwXMFD63PG6tBBvyhsmsxBoSwKp4NhTY052A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K6EPVtI9vhfO4gKJ1z6SOLFOnWaZ+pWPTtC1BLmmcU1yVco2MTBxEa60xfZdHmPjL Rv0U5pYqQEIGDhzfis8NF1kRDB1Glg9P2dXpcDCh76BamfYxImQmbDoDELXi5J8Nba nMvjPGR8jqNHCPy5L8zIeVL/nJXe41XDDMCHuB4Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Naresh Kumar PBS , Selvin Xavier , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.8 020/177] RDMA/bnxt_re: Static NQ depth allocation Date: Tue, 15 Sep 2020 16:11:31 +0200 Message-Id: <20200915140654.616022769@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915140653.610388773@linuxfoundation.org> References: <20200915140653.610388773@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Naresh Kumar PBS [ Upstream commit f86b31c6a28f06eed3f6d9dc958079853b0792f1 ] At first, driver allocates memory for NQ based on qplib_ctx->cq_count and qplib_ctx->srqc_count. Later when creating ring, it uses a static value of 128K -1. Fixing this with a static value for now. Fixes: b08fe048a69d ("RDMA/bnxt_re: Refactor net ring allocation function") Link: https://lore.kernel.org/r/1598292876-26529-5-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Naresh Kumar PBS Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/bnxt_re/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 5c41e13496a02..882c4f49d3a87 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -1027,8 +1027,7 @@ static int bnxt_re_alloc_res(struct bnxt_re_dev *rdev) struct bnxt_qplib_nq *nq; nq = &rdev->nq[i]; - nq->hwq.max_elements = (qplib_ctx->cq_count + - qplib_ctx->srqc_count + 2); + nq->hwq.max_elements = BNXT_QPLIB_NQE_MAX_CNT; rc = bnxt_qplib_alloc_nq(&rdev->qplib_res, &rdev->nq[i]); if (rc) { ibdev_err(&rdev->ibdev, "Alloc Failed NQ%d rc:%#x", -- 2.25.1