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 2/3] RDMA/mana_ib: MMQ creation for RC QPs
Date: Fri, 7 Aug 2026 06:51:31 -0700 [thread overview]
Message-ID: <20260807135132.1618382-3-kotaranov@linux.microsoft.com> (raw)
In-Reply-To: <20260807135132.1618382-1-kotaranov@linux.microsoft.com>
From: Konstantin Taranov <kotaranov@microsoft.com>
Create an MMQ for an RC QP when userspace sets the corresponding
compatibility-mask flag. Register the userspace MMQ buffer and pass the
queue to hardware instead of setting the NO_MMQ creation flag.
Keep the MMQ disabled for applications that do not request it, preserving
the existing behavior. Return the created MMQ ID to userspace in the
extended RC QP response.
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
---
drivers/infiniband/hw/mana/qp.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/hw/mana/qp.c b/drivers/infiniband/hw/mana/qp.c
index aa5f8c6077bb0..c6821ae5fac1c 100644
--- a/drivers/infiniband/hw/mana/qp.c
+++ b/drivers/infiniband/hw/mana/qp.c
@@ -557,16 +557,22 @@ static int mana_ib_create_rc_qp(struct ib_qp *ibqp, struct ib_pd *ibpd,
for (i = 0, j = 0; i < MANA_RC_QUEUE_TYPE_MAX; ++i) {
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;
+ if (ucmd.comp_mask & MANA_IB_RC_MMQ_CREATE) {
+ flags &= ~MANA_RC_FLAG_NO_MMQ;
+ err = mana_ib_create_queue(mdev, ucmd.mmq_buf, ucmd.mmq_size,
+ &qp->rc_qp.queues[i]);
+ if (err)
+ goto destroy_queues;
+ } else {
+ qp->rc_qp.queues[i].id = INVALID_QUEUE_ID;
+ qp->rc_qp.queues[i].gdma_region = GDMA_INVALID_DMA_REGION;
+ }
continue;
}
err = mana_ib_create_queue(mdev, ucmd.queue_buf[j], ucmd.queue_size[j],
&qp->rc_qp.queues[i]);
- if (err) {
- ibdev_err(&mdev->ib_dev, "Failed to create queue %d, err %d\n", i, err);
+ if (err)
goto destroy_queues;
- }
j++;
}
@@ -580,8 +586,10 @@ 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_MMQ)
+ if (i == MANA_RC_SEND_QUEUE_MMQ) {
+ resp.mmq_id = qp->rc_qp.queues[i].id;
continue;
+ }
resp.queue_id[j] = qp->rc_qp.queues[i].id;
j++;
}
--
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 ` [PATCH rdma-next 1/3] RDMA/mana_ib: Extend RC QP udata request and response Konstantin Taranov
2026-08-07 13:51 ` Konstantin Taranov [this message]
2026-08-07 13:51 ` [PATCH rdma-next 3/3] RDMA/mana_ib: fixed send wqe size support for RC QPs 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-3-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