Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3940224pxj; Mon, 21 Jun 2021 09:49:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZnjrxtouJlw33pIX6NXGYsZmRoFii6UbgeFiQSkXgz2tL98iyReFk8LrqU//2fKID2Byo X-Received: by 2002:a50:fc84:: with SMTP id f4mr23088953edq.252.1624294157009; Mon, 21 Jun 2021 09:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294157; cv=none; d=google.com; s=arc-20160816; b=SWfcVadNqFGvkk/VI4feCbOCPQKPusw9FsCQV8+tM35FojLMOfz9OsX/xWheBgQvnF g32WYhrSw5TDScz5LE/m1LyJCG0XWu7SqNkHUNACINm//GUxfw2HEuv+IJp8SopwpkvZ Kk+JDMWQu03eYLKfN6gWMBClaUH3qrfeaBrdIwFcWHNyxjaz13VWn1aAAKs9K+snqt5z lJA/A5npXU0YNDOfe4sawoRU1b2say2C57KrkELQrxd0aEupUs0uqjIodO65un5yIzAD RPbRtCmb3GBMXasZi+49IxY2dxsv+JYmrTD6u5N7A95jSG5uAEVu+e+/ZACr9IYoufef H+1g== 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=8nXHV3LtrH9sNTYVZ4OzCWtSfgErb6qFhJDHqTQ42DM=; b=nPjfgyJoNbxVz87VxHU7VP0pqlVsoEJ37zANIIoOwgFvtrOAZuJKdHcQnloB5DcgS+ 9pPXuCbzmnlvhT0Go0YnzVXUQg3h4dFaR3r13lJVwF1n8fH3ns/EfrOkDwY10jEwOCX5 DOazvYiOGztKqEiKTHMHuXolLXvB7XOA/obAd+wnaE8T1saeM48LUg7chpUMYmWCS8Bi Oa8FEPmoHS/CqJhFNEmVf461F+plJaIEUfpT0JJUnxu49PwAr2vNLPw+ifsNNZExV/wp EFAERUKVrTdvIXtuO1ZNFvLOOVOmYaO/KedZ0BDCPNP8A8jsGBgdkBm7qk1e6iz0agZQ 7z3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bz6wRJsv; 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 e4si6606734ejy.484.2021.06.21.09.48.53; Mon, 21 Jun 2021 09:49:16 -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=bz6wRJsv; 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 S232105AbhFUQrj (ORCPT + 99 others); Mon, 21 Jun 2021 12:47:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:33938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232947AbhFUQlr (ORCPT ); Mon, 21 Jun 2021 12:41:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 025D66138C; Mon, 21 Jun 2021 16:31:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293062; bh=s31e3nJSl+T4LnP0JzBdUwt4CDnlEjoPFyAEICpHRO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bz6wRJsvTr3O2v4UkR72A4vKaQzWX2RmgUR5DTOKvhwuCmveeIzFKPT6yWSLfYtrQ jHcJtFApr8FWZehdMCO5EoD51hyclN52PykbV0CaJSHjEbQWphAo1sDy/VRnfpD9Nu Mi76Esz9VQGQFwTXp8xLTmJxnSHmFyOPw2u65m/Y= 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.12 084/178] bnxt_en: Fix TQM fastpath ring backing store computation Date: Mon, 21 Jun 2021 18:14:58 +0200 Message-Id: <20210621154925.503335700@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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 e9ac20c1c389..48c19602a0f3 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -7295,7 +7295,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