Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3925344pxj; Mon, 21 Jun 2021 09:30:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1nMJffn8Q00r1m//x3xV9hJ9A6iEmlFOiNbIez3RVN4SZpDj2soUOLog67DayzXDEPebv X-Received: by 2002:a6b:6813:: with SMTP id d19mr6755503ioc.35.1624293020033; Mon, 21 Jun 2021 09:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293020; cv=none; d=google.com; s=arc-20160816; b=G1eLfx3DdSlxrisNLFPXcqKKm1LqzZB68LZRu1BNyjmUTpqX5vMyxiMdnt9EUmLPju kj+3Nv9dxboWnS6qebq3aWemPm5KUoTFD/DEypP7uoTSpvaVx7eJMjgSMDH/skeuZxn7 s5uGXON2GeDLjD5P4DjdZnxbvHsjkWK3RslfXVxIS4x/egOrpK5yXnZf5f5zFnZAoeSq j+0CVGxU5pdJh0fxSBmTuFUdjHpzzYIXWINvKprrM3T1QDFX41PDvr8R7B9j0FomV31/ pjpGB/YIgwYkom8COABMdsnnd0mRhI428NsqY4xMYLhXG6H+Od/BPVvjkeV9bSX7jXz2 zwFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AoaDdU9T8yth0cNJPKCdvDAtTHWjEV5n8BUY++drYfA=; b=VGCKsHF2ALt07wE/RHHJmeFLNQi9OjtfkzCYpigBdfp78xk2UXBHY08RUobMI51tA2 QprIA70v5Kjw/zsDCfkaurQt22mBeUcd4tVPEugtVbfqrs6HKtibvl5fd5tsxG4v0t++ i5hOy4iFagdDmTjQhHCkFzlm+G9aWt/EvyY2nEgg7c13uUw/XBtLDFieHE9tUNyIV9CZ m2yY62Uc4yXXvuxss7zyPUPZdPoxeaJuAQP+sxoU6Mt2tIIFURlozQnLl2B2LwyIZADI LXVss70pnYbbqqI6/HvW8Zt5EkC7VDgcGJQys4FX23YFXp4k4L8XTBZpYFWedOgbiXdD 06qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ued2amQO; 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=pass (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 h78si19938681iof.66.2021.06.21.09.30.07; Mon, 21 Jun 2021 09:30:20 -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=@linuxfoundation.org header.s=korg header.b=Ued2amQO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232056AbhFUQbr (ORCPT + 99 others); Mon, 21 Jun 2021 12:31:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:49592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231429AbhFUQ2p (ORCPT ); Mon, 21 Jun 2021 12:28:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1C1FA613E9; Mon, 21 Jun 2021 16:23:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292627; bh=WvaPbcNA+EDFJ6n4l8FKemglCe+jBKtDS0JqubBFvsg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ued2amQOWtqXsc0+lOphZQZtO7i6L0XQo0uImsz5hE8drXvGfvod5e2mkYF4tN4qC nxeG4Mgojqt5XdEo0Quor7D0G3WGVSpjUtTKucMbm39YNr69SmhwNFRhYOBDw0WGa5 mXJLwgYyxyFnjD9Kgb8qsYPnEz+4NiAvnemZIBls= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rukhsana Ansari , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 070/146] bnxt_en: Fix TQM fastpath ring backing store computation Date: Mon, 21 Jun 2021 18:15:00 +0200 Message-Id: <20210621154915.295344929@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rukhsana Ansari [ Upstream commit c12e1643d2738bcd4e26252ce531878841dd3f38 ] TQM fastpath ring needs to be sized to store both the requester and responder side of RoCE QPs in TQM for supporting bi-directional tests. Fix bnxt_alloc_ctx_mem() to multiply the RoCE QPs by a factor of 2 when computing the number of entries for TQM fastpath ring. This fixes an RX pipeline stall issue when running bi-directional max RoCE QP tests. Fixes: c7dd7ab4b204 ("bnxt_en: Improve TQM ring context memory sizing formulas.") Signed-off-by: Rukhsana Ansari Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 70c03c156e00..3f3d13a18992 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -7184,7 +7184,7 @@ skip_rdma: entries_sp = ctx->vnic_max_vnic_entries + ctx->qp_max_l2_entries + 2 * (extra_qps + ctx->qp_min_qp1_entries) + min; entries_sp = roundup(entries_sp, ctx->tqm_entries_multiple); - entries = ctx->qp_max_l2_entries + extra_qps + ctx->qp_min_qp1_entries; + entries = ctx->qp_max_l2_entries + 2 * (extra_qps + ctx->qp_min_qp1_entries); entries = roundup(entries, ctx->tqm_entries_multiple); entries = clamp_t(u32, entries, min, ctx->tqm_max_entries_per_ring); for (i = 0; i < ctx->tqm_fp_rings_count + 1; i++) { -- 2.30.2