* [PATCH rdma-next v2 1/1] RDMA/mana_ib: take CQ type from the device type
@ 2026-01-15 9:36 Konstantin Taranov
2026-01-15 11:04 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Taranov @ 2026-01-15 9:36 UTC (permalink / raw)
To: kotaranov, shirazsaleem, longli, jgg, leon; +Cc: linux-rdma, linux-kernel
From: Konstantin Taranov <kotaranov@microsoft.com>
Get CQ type from the used gdma device. The MANA_IB_CREATE_RNIC_CQ
flag is ignored. It was used in older kernel versions where
the mana_ib was shared between ethernet and rnic.
Fixes: d4293f96ce0b ("RDMA/mana_ib: unify mana_ib functions to support any gdma device")
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
---
v2: added comment that the flag is reserved
drivers/infiniband/hw/mana/cq.c | 4 +---
include/uapi/rdma/mana-abi.h | 3 +++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/mana/cq.c b/drivers/infiniband/hw/mana/cq.c
index 1becc8779..2dce1b677 100644
--- a/drivers/infiniband/hw/mana/cq.c
+++ b/drivers/infiniband/hw/mana/cq.c
@@ -24,6 +24,7 @@ int mana_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
cq->comp_vector = attr->comp_vector % ibdev->num_comp_vectors;
cq->cq_handle = INVALID_MANA_HANDLE;
+ is_rnic_cq = mana_ib_is_rnic(mdev);
if (udata) {
if (udata->inlen < offsetof(struct mana_ib_create_cq, flags))
@@ -35,8 +36,6 @@ int mana_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
return err;
}
- is_rnic_cq = !!(ucmd.flags & MANA_IB_CREATE_RNIC_CQ);
-
if ((!is_rnic_cq && attr->cqe > mdev->adapter_caps.max_qp_wr) ||
attr->cqe > U32_MAX / COMP_ENTRY_SIZE) {
ibdev_dbg(ibdev, "CQE %d exceeding limit\n", attr->cqe);
@@ -55,7 +54,6 @@ int mana_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
ibucontext);
doorbell = mana_ucontext->doorbell;
} else {
- is_rnic_cq = true;
buf_size = MANA_PAGE_ALIGN(roundup_pow_of_two(attr->cqe * COMP_ENTRY_SIZE));
cq->cqe = buf_size / COMP_ENTRY_SIZE;
err = mana_ib_create_kernel_queue(mdev, buf_size, GDMA_CQ, &cq->queue);
diff --git a/include/uapi/rdma/mana-abi.h b/include/uapi/rdma/mana-abi.h
index 45c2df619..a75bf32b8 100644
--- a/include/uapi/rdma/mana-abi.h
+++ b/include/uapi/rdma/mana-abi.h
@@ -17,6 +17,9 @@
#define MANA_IB_UVERBS_ABI_VERSION 1
enum mana_ib_create_cq_flags {
+ /* Reserved for backward compatibility. Legacy
+ * kernel versions use it to create CQs in RNIC
+ */
MANA_IB_CREATE_RNIC_CQ = 1 << 0,
};
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH rdma-next v2 1/1] RDMA/mana_ib: take CQ type from the device type
2026-01-15 9:36 [PATCH rdma-next v2 1/1] RDMA/mana_ib: take CQ type from the device type Konstantin Taranov
@ 2026-01-15 11:04 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2026-01-15 11:04 UTC (permalink / raw)
To: kotaranov, shirazsaleem, longli, jgg, Konstantin Taranov
Cc: linux-rdma, linux-kernel
On Thu, 15 Jan 2026 01:36:25 -0800, Konstantin Taranov wrote:
> Get CQ type from the used gdma device. The MANA_IB_CREATE_RNIC_CQ
> flag is ignored. It was used in older kernel versions where
> the mana_ib was shared between ethernet and rnic.
>
>
Applied, thanks!
[1/1] RDMA/mana_ib: take CQ type from the device type
https://git.kernel.org/rdma/rdma/c/f972bde7326e9c
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-15 11:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-15 9:36 [PATCH rdma-next v2 1/1] RDMA/mana_ib: take CQ type from the device type Konstantin Taranov
2026-01-15 11:04 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®