From: Selvin Xavier <selvin.xavier@broadcom.com>
To: leon@kernel.org, jgg@ziepe.ca
Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com,
kalesh-anakkur.purayil@broadcom.com,
Abhishek Mohapatra <abhishek.mohapatra@broadcom.com>,
Selvin Xavier <selvin.xavier@broadcom.com>
Subject: [PATCH for-next 2/4] RDMA/bnxt_re: Set CQ coalescing max buffers to 1 for CQs with depth 1
Date: Sun, 29 Nov 2026 15:21:03 -0800 [thread overview]
Message-ID: <20261129232105.358484-3-selvin.xavier@broadcom.com> (raw)
In-Reply-To: <20261129232105.358484-1-selvin.xavier@broadcom.com>
From: Abhishek Mohapatra <abhishek.mohapatra@broadcom.com>
When the CQ depth is 1, program NORMAL_MAXBUF and DURING_MAXBUF to 1
in bnxt_qplib_create_cq(). A single-entry CQ has at most one
outstanding completion, so firmware flushes it as soon as it is
buffered instead of waiting for more.
Signed-off-by: Abhishek Mohapatra <abhishek.mohapatra@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
drivers/infiniband/hw/bnxt_re/qplib_fp.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
index 57c773521feb..c03624b02570 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
@@ -2088,6 +2088,8 @@ int bnxt_qplib_post_recv(struct bnxt_qplib_qp *qp,
/* CQ */
int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)
{
+ u8 normal_maxbuf = cq->coalescing->normal_maxbuf;
+ u8 during_maxbuf = cq->coalescing->during_maxbuf;
struct bnxt_qplib_rcfw *rcfw = res->rcfw;
struct bnxt_qplib_hwq_attr hwq_attr = {};
struct creq_create_cq_resp resp = {};
@@ -2129,13 +2131,17 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)
if (_is_cq_coalescing_supported(res->dattr->dev_cap_flags2) &&
cq->coalescing->enable) {
req.flags |= cpu_to_le16(CMDQ_CREATE_CQ_FLAGS_COALESCING_VALID);
+ if (cq->max_wqe == 1) {
+ normal_maxbuf = 0x1;
+ during_maxbuf = 0x1;
+ }
coalescing |= ((cq->coalescing->buf_maxtime <<
CMDQ_CREATE_CQ_BUF_MAXTIME_SFT) &
CMDQ_CREATE_CQ_BUF_MAXTIME_MASK);
- coalescing |= ((cq->coalescing->normal_maxbuf <<
+ coalescing |= ((normal_maxbuf <<
CMDQ_CREATE_CQ_NORMAL_MAXBUF_SFT) &
CMDQ_CREATE_CQ_NORMAL_MAXBUF_MASK);
- coalescing |= ((cq->coalescing->during_maxbuf <<
+ coalescing |= ((during_maxbuf <<
CMDQ_CREATE_CQ_DURING_MAXBUF_SFT) &
CMDQ_CREATE_CQ_DURING_MAXBUF_MASK);
if (cq->coalescing->en_ring_idle_mode)
--
2.39.3
next prev parent reply other threads:[~2026-11-29 18:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 23:21 [PATCH for-next 0/4] RDMA/bnxt_re: CQ and QP updates for app allocated queues Selvin Xavier
2026-11-29 18:21 ` sashiko-bot
2026-11-29 23:21 ` [PATCH for-next 1/4] RDMA/bnxt_re: Disable CQ overflow detection on P7 adapters based on FW support Selvin Xavier
2026-11-29 23:21 ` Selvin Xavier [this message]
2026-11-29 23:21 ` [PATCH for-next 3/4] RDMA/bnxt_re: Simplify PSN size and QP HWQ setup paths Selvin Xavier
2026-11-29 23:21 ` [PATCH for-next 4/4] RDMA/bnxt_re: Allow user library to request STATIC WQE mode per-QP Selvin Xavier
2026-11-29 18:21 ` sashiko-bot
2026-11-30 7:35 ` Selvin Xavier
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=20261129232105.358484-3-selvin.xavier@broadcom.com \
--to=selvin.xavier@broadcom.com \
--cc=abhishek.mohapatra@broadcom.com \
--cc=andrew.gospodarek@broadcom.com \
--cc=jgg@ziepe.ca \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.