From: Snehal Sanghvi <snsanghvi@linux.microsoft.com>
To: kotaranov@microsoft.com, snsanghvi@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] RDMA/mana_ib: advertise pow2 RC SQ support to user space
Date: Wed, 2 Sep 2026 08:38:13 -0700 [thread overview]
Message-ID: <20260902153813.3385076-1-snsanghvi@linux.microsoft.com> (raw)
From: Snehal Sanghvi <snsanghvi@microsoft.com>
The send queue of an RC QP normally needs an extra rollback area in
shared memory. With fixed-size WQEs the rollback can be derived from the
WQE size alone, so an adapter supporting it can accept a plain
power-of-two send queue and the rollback area becomes unnecessary.
Report the adapter capability to user space with a new comp_mask bit in
the alloc ucontext response, so that user space can request a
power-of-two RC send queue when the adapter supports it.
Signed-off-by: Snehal Sanghvi <snsanghvi@microsoft.com>
Reviewed-by: Konstantin Taranov <kotaranov@microsoft.com>
---
drivers/infiniband/hw/mana/main.c | 2 ++
drivers/infiniband/hw/mana/mana_ib.h | 1 +
include/uapi/rdma/mana-abi.h | 1 +
3 files changed, 4 insertions(+)
diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana/main.c
index 83a97f1c5c..672bd3f650 100644
--- a/drivers/infiniband/hw/mana/main.c
+++ b/drivers/infiniband/hw/mana/main.c
@@ -248,6 +248,8 @@ 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;
+ if (mdev->adapter_caps.feature_flags & MANA_IB_FEATURE_RC_QP_SQ_POW2_SUPPORT)
+ ucmd_resp.comp_mask |= MANA_IB_UCNTX_RC_SQ_POW2_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 1be33ed8bd..4da110b302 100644
--- a/drivers/infiniband/hw/mana/mana_ib.h
+++ b/drivers/infiniband/hw/mana/mana_ib.h
@@ -268,6 +268,7 @@ enum mana_ib_adapter_features {
MANA_IB_FEATURE_DEV_COUNTERS_SUPPORT = BIT(5),
MANA_IB_FEATURE_MULTI_PORTS_SUPPORT = BIT(6),
MANA_IB_FEATURE_MSN_IN_WQE_SUPPORT = BIT(7),
+ MANA_IB_FEATURE_RC_QP_SQ_POW2_SUPPORT = BIT(14),
MANA_IB_FEATURE_MULTI_PORT_GSI_SUPPORT = BIT(15),
};
diff --git a/include/uapi/rdma/mana-abi.h b/include/uapi/rdma/mana-abi.h
index c9a2417666..ebc9a655b8 100644
--- a/include/uapi/rdma/mana-abi.h
+++ b/include/uapi/rdma/mana-abi.h
@@ -111,6 +111,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,
+ MANA_IB_UCNTX_RC_SQ_POW2_SUPPORT = 1 << 2,
};
struct mana_ib_alloc_ucontext_resp {
--
2.43.0
reply other threads:[~2026-09-02 15:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260902153813.3385076-1-snsanghvi@linux.microsoft.com \
--to=snsanghvi@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 \
--cc=snsanghvi@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
all inboxes | Powered by JetHome®