From: Jason Gunthorpe <jgg@ziepe.ca>
To: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Cc: leon@kernel.org, linux-rdma@vger.kernel.org,
andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com,
kalesh-anakkur.purayil@broadcom.com
Subject: Re: [PATCH rdma-next v11 6/6] RDMA/bnxt_re: Support application specific CQs
Date: Tue, 10 Feb 2026 15:14:49 -0400 [thread overview]
Message-ID: <20260210191449.GE750753@ziepe.ca> (raw)
In-Reply-To: <20260210165939.41625-7-sriharsha.basavapatna@broadcom.com>
On Tue, Feb 10, 2026 at 10:29:39PM +0530, Sriharsha Basavapatna wrote:
> diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> index dc73f0072528..04588b4f79c0 100644
> --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> @@ -3372,6 +3372,9 @@ static int bnxt_re_setup_sginfo(struct bnxt_re_dev *rdev,
> return 0;
> }
>
> +static u64 bnxt_re_cq_cmask_supported = (BNXT_RE_CQ_TOGGLE_PAGE_SUPPORT |
> + BNXT_RE_CQ_APP_ALLOC_ENABLE);
Don't mix req and resp flags together!!!
Also don't make a global static variable, just pass the flags directly
to the helper.
> int bnxt_re_create_cq_umem(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
> struct ib_umem *umem, struct uverbs_attr_bundle *attrs)
> {
> @@ -3382,6 +3385,7 @@ int bnxt_re_create_cq_umem(struct ib_cq *ibcq, const struct ib_cq_init_attr *att
> rdma_udata_to_drv_context(udata, struct bnxt_re_ucontext, ib_uctx);
> struct bnxt_qplib_dev_attr *dev_attr = rdev->dev_attr;
> struct bnxt_qplib_chip_ctx *cctx;
> + struct bnxt_re_cq_req req = {};
No need to zero memory being passed to ib_copy_validate_udata_in_cm(),
it always writes to the whole struct.
> diff --git a/include/uapi/rdma/bnxt_re-abi.h b/include/uapi/rdma/bnxt_re-abi.h
> index 1f7685665db1..26eeb78193fa 100644
> --- a/include/uapi/rdma/bnxt_re-abi.h
> +++ b/include/uapi/rdma/bnxt_re-abi.h
> @@ -103,10 +103,12 @@ struct bnxt_re_pd_resp {
> struct bnxt_re_cq_req {
> __aligned_u64 cq_va;
> __aligned_u64 cq_handle;
> + __aligned_u64 comp_mask;
> };
>
> enum bnxt_re_cq_mask {
> BNXT_RE_CQ_TOGGLE_PAGE_SUPPORT = 0x1,
> + BNXT_RE_CQ_APP_ALLOC_ENABLE = 0x2,
> };
The req/resp comp masks should be kept separate.
The name should be much more specific "BNXT_RE_CQ_EXACT_CQE" or something.
This is all alot better now, thanks
Jhason
next prev parent reply other threads:[~2026-02-10 19:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 16:59 [PATCH rdma-next v11 0/6] RDMA/bnxt_re: Support uapi extensions Sriharsha Basavapatna
2026-02-10 16:59 ` [PATCH rdma-next v11 1/6] RDMA/bnxt_re: Move the UAPI methods to a dedicated file Sriharsha Basavapatna
2026-02-10 16:59 ` [PATCH rdma-next v11 2/6] RDMA/bnxt_re: Refactor bnxt_qplib_create_qp() function Sriharsha Basavapatna
2026-02-10 16:59 ` [PATCH rdma-next v11 3/6] RDMA/bnxt_re: Support doorbell extensions Sriharsha Basavapatna
2026-02-10 16:59 ` [PATCH rdma-next v11 4/6] RDMA/bnxt_re: Refactor bnxt_re_create_cq() Sriharsha Basavapatna
2026-02-10 19:07 ` Jason Gunthorpe
2026-02-11 11:25 ` Sriharsha Basavapatna
2026-02-11 12:48 ` Jason Gunthorpe
2026-02-10 16:59 ` [PATCH rdma-next v11 5/6] RDMA/bnxt_re: Support dmabuf for CQ rings Sriharsha Basavapatna
2026-02-10 16:59 ` [PATCH rdma-next v11 6/6] RDMA/bnxt_re: Support application specific CQs Sriharsha Basavapatna
2026-02-10 19:14 ` Jason Gunthorpe [this message]
2026-02-11 11:24 ` Sriharsha Basavapatna
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=20260210191449.GE750753@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=andrew.gospodarek@broadcom.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox