public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom•com>
To: davem@davemloft•net
Cc: netdev@vger•kernel.org, kuba@kernel•org, gospo@broadcom•com
Subject: [PATCH net 2/3] bnxt_en: Fix TQM fastpath ring backing store computation
Date: Fri, 18 Jun 2021 02:07:26 -0400	[thread overview]
Message-ID: <1623996447-28958-3-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1623996447-28958-1-git-send-email-michael.chan@broadcom.com>

From: Rukhsana Ansari <rukhsana.ansari@broadcom•com>

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 <rukhsana.ansari@broadcom•com>
Signed-off-by: Michael Chan <michael.chan@broadcom•com>
---
 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 3685db6dc93d..c913cb1f2a72 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -7308,7 +7308,7 @@ static int bnxt_alloc_ctx_mem(struct bnxt *bp)
 	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.18.1


  parent reply	other threads:[~2021-06-18  6:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  6:07 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
2021-06-18  6:07 ` [PATCH net 1/3] bnxt_en: Rediscover PHY capabilities after firmware reset Michael Chan
2021-06-18  6:07 ` Michael Chan [this message]
2021-06-18  6:07 ` [PATCH net 3/3] bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path Michael Chan
2021-06-18 19:10 ` [PATCH net 0/3] bnxt_en: Bug fixes patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1623996447-28958-3-git-send-email-michael.chan@broadcom.com \
    --to=michael.chan@broadcom$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=gospo@broadcom$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox