From: Konstantin Taranov <kotaranov@linux.microsoft.com>
To: kotaranov@microsoft.com, longli@microsoft.com, jgg@ziepe.ca,
leon@kernel.org
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH rdma-next 1/3] RDMA/mana_ib: Extend RC QP udata request and response
Date: Fri, 7 Aug 2026 06:51:30 -0700 [thread overview]
Message-ID: <20260807135132.1618382-2-kotaranov@linux.microsoft.com> (raw)
In-Reply-To: <20260807135132.1618382-1-kotaranov@linux.microsoft.com>
From: Konstantin Taranov <kotaranov@microsoft.com>
Extend the RC QP creation UAPI to support optional fixed-size WQEs and an
MMQ. Add a compatibility mask to the request, return the MMQ ID in the
response, and advertise the extended ABI through ucontext capabilities.
Use compatibility-aware udata validation so existing userspace remains
supported. Rename the legacy FMR queue definitions to MMQ and add the
corresponding hardware creation flags.
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
---
drivers/infiniband/hw/mana/main.c | 1 +
drivers/infiniband/hw/mana/mana_ib.h | 6 ++++--
drivers/infiniband/hw/mana/qp.c | 10 +++++-----
include/uapi/rdma/mana-abi.h | 11 +++++++++++
4 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana/main.c
index e4414d208d4ac..9d043f48e2729 100644
--- a/drivers/infiniband/hw/mana/main.c
+++ b/drivers/infiniband/hw/mana/main.c
@@ -247,6 +247,7 @@ int mana_ib_alloc_ucontext(struct ib_ucontext *ibcontext,
ucontext->doorbell = doorbell_page;
ucmd_resp.comp_mask = MANA_IB_UCNTX_ALLOC_PDN_SUPPORT;
+ ucmd_resp.comp_mask |= MANA_IB_UCNTX_RC_EXT_SUPPORT;
ret = ib_respond_udata(udata, ucmd_resp);
if (ret)
return ret;
diff --git a/drivers/infiniband/hw/mana/mana_ib.h b/drivers/infiniband/hw/mana/mana_ib.h
index f698666967764..547ddf9ddfea5 100644
--- a/drivers/infiniband/hw/mana/mana_ib.h
+++ b/drivers/infiniband/hw/mana/mana_ib.h
@@ -172,7 +172,7 @@ struct mana_ib_cq {
enum mana_rc_queue_type {
MANA_RC_SEND_QUEUE_REQUESTER = 0,
MANA_RC_SEND_QUEUE_RESPONDER,
- MANA_RC_SEND_QUEUE_FMR,
+ MANA_RC_SEND_QUEUE_MMQ,
MANA_RC_RECV_QUEUE_REQUESTER,
MANA_RC_RECV_QUEUE_RESPONDER,
MANA_RC_QUEUE_TYPE_MAX,
@@ -372,7 +372,9 @@ struct mana_rnic_destroy_cq_resp {
}; /* HW Data */
enum mana_rnic_create_rc_flags {
- MANA_RC_FLAG_NO_FMR = 2,
+ MANA_RC_FLAG_NO_MMQ = BIT(1),
+ MANA_RC_FLAG_FIXED_SIZE_WQE = BIT(3),
+ MANA_RC_FLAG_MSN_IN_WQE = BIT(4),
};
struct mana_rnic_create_qp_req {
diff --git a/drivers/infiniband/hw/mana/qp.c b/drivers/infiniband/hw/mana/qp.c
index 8b7be1255c0d0..aa5f8c6077bb0 100644
--- a/drivers/infiniband/hw/mana/qp.c
+++ b/drivers/infiniband/hw/mana/qp.c
@@ -549,14 +549,14 @@ static int mana_ib_create_rc_qp(struct ib_qp *ibqp, struct ib_pd *ibpd,
mana_ucontext = rdma_udata_to_drv_context(udata, struct mana_ib_ucontext, ibucontext);
doorbell = mana_ucontext->doorbell;
- flags = MANA_RC_FLAG_NO_FMR;
- err = ib_copy_validate_udata_in(udata, ucmd, queue_size);
+ flags = MANA_RC_FLAG_NO_MMQ;
+ err = ib_copy_validate_udata_in_cm(udata, ucmd, queue_size,
+ MANA_IB_RC_QP_FIXED_WQE | MANA_IB_RC_MMQ_CREATE);
if (err)
return err;
for (i = 0, j = 0; i < MANA_RC_QUEUE_TYPE_MAX; ++i) {
- /* skip FMR for user-level RC QPs */
- if (i == MANA_RC_SEND_QUEUE_FMR) {
+ if (i == MANA_RC_SEND_QUEUE_MMQ) {
qp->rc_qp.queues[i].id = INVALID_QUEUE_ID;
qp->rc_qp.queues[i].gdma_region = GDMA_INVALID_DMA_REGION;
continue;
@@ -580,7 +580,7 @@ static int mana_ib_create_rc_qp(struct ib_qp *ibqp, struct ib_pd *ibpd,
if (udata) {
for (i = 0, j = 0; i < MANA_RC_QUEUE_TYPE_MAX; ++i) {
- if (i == MANA_RC_SEND_QUEUE_FMR)
+ if (i == MANA_RC_SEND_QUEUE_MMQ)
continue;
resp.queue_id[j] = qp->rc_qp.queues[i].id;
j++;
diff --git a/include/uapi/rdma/mana-abi.h b/include/uapi/rdma/mana-abi.h
index 32cbbfc80f996..2ddb9f167969b 100644
--- a/include/uapi/rdma/mana-abi.h
+++ b/include/uapi/rdma/mana-abi.h
@@ -48,13 +48,23 @@ struct mana_ib_create_qp_resp {
__u32 reserved;
};
+enum mana_ib_create_rc_qp_flags {
+ MANA_IB_RC_QP_FIXED_WQE = BIT(0),
+ MANA_IB_RC_MMQ_CREATE = BIT(1),
+};
+
struct mana_ib_create_rc_qp {
__aligned_u64 queue_buf[4];
__u32 queue_size[4];
+ __aligned_u64 mmq_buf;
+ __u32 mmq_size;
+ __u32 comp_mask;
};
struct mana_ib_create_rc_qp_resp {
__u32 queue_id[4];
+ __u32 mmq_id;
+ __u32 reserved;
};
struct mana_ib_create_uc_qp {
@@ -100,6 +110,7 @@ struct mana_ib_create_qp_rss_resp {
enum mana_ib_ucontext_support {
MANA_IB_UCNTX_ALLOC_PDN_SUPPORT = 1 << 0,
+ MANA_IB_UCNTX_RC_EXT_SUPPORT = 1 << 1,
};
struct mana_ib_alloc_ucontext_resp {
--
2.43.0
next prev parent reply other threads:[~2026-08-07 13:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 13:51 [PATCH rdma-next 0/3] RDMA/mana_ib: Extend MANA RC QP support for UAPI Konstantin Taranov
2026-08-07 13:51 ` Konstantin Taranov [this message]
2026-08-07 13:51 ` [PATCH rdma-next 2/3] RDMA/mana_ib: MMQ creation for RC QPs Konstantin Taranov
2026-08-07 13:51 ` [PATCH rdma-next 3/3] RDMA/mana_ib: fixed send wqe size support " Konstantin Taranov
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=20260807135132.1618382-2-kotaranov@linux.microsoft.com \
--to=kotaranov@linux.microsoft.com \
--cc=jgg@ziepe.ca \
--cc=kotaranov@microsoft.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@microsoft.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