Re: [PATCH rdma-next 1/1] RDMA/mana_ib: UC QP support for UAPI
From: Leon Romanovsky
Date: Thu Mar 19 2026 - 07:05:46 EST
On Thu, Mar 19, 2026 at 03:39:01AM -0700, Konstantin Taranov wrote:
> From: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
>
> Implement UC QP creation in the RNIC HW for user API. An UC QP is exposed
> as three work queues: send, receive, and memory management. The latter is
> used for bind and invalidate WQEs to support memory windows.
>
> Signed-off-by: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
> ---
> drivers/infiniband/hw/mana/main.c | 41 ++++++++++++-
> drivers/infiniband/hw/mana/mana_ib.h | 41 ++++++++++++-
> drivers/infiniband/hw/mana/qp.c | 92 ++++++++++++++++++++++++++--
> include/uapi/rdma/mana-abi.h | 18 ++++++
> 4 files changed, 183 insertions(+), 9 deletions(-)
<...>
> +static int mana_ib_create_uc_qp(struct ib_qp *ibqp, struct ib_pd *ibpd,
> + struct ib_qp_init_attr *attr, struct ib_udata *udata)
> +{
<...>
> + if (!udata || udata->inlen < sizeof(ucmd))
> + return -EINVAL;
<...>
> + if (udata) {
udata is always true.
> diff --git a/include/uapi/rdma/mana-abi.h b/include/uapi/rdma/mana-abi.h
> index a75bf32b8..a50d4c012 100644
> --- a/include/uapi/rdma/mana-abi.h
> +++ b/include/uapi/rdma/mana-abi.h
> @@ -57,6 +57,24 @@ struct mana_ib_create_rc_qp_resp {
> __u32 queue_id[4];
> };
>
> +enum {
> + MANA_UC_UDATA_SQR = 0,
> + MANA_UC_UDATA_RQR = 1,
> + MANA_UC_UDATA_SMQ = 2,
> + MANA_UC_UDATA_MAX = 3,
> +};
> +
> +struct mana_ib_create_uc_qp {
> + __aligned_u64 queue_buf[MANA_UC_UDATA_MAX];
> + __u32 queue_size[MANA_UC_UDATA_MAX];
This array is not possible to extend. Any addition to enum above will
break ABI. You shouldn't add enum and use 3 directly here.
> + __u32 reserved;
> +};
> +
> +struct mana_ib_create_uc_qp_resp {
> + __u32 queue_id[MANA_UC_UDATA_MAX];
Same.
Thanks
> + __u32 reserved;
> +};
> +
> struct mana_ib_create_wq {
> __aligned_u64 wq_buf_addr;
> __u32 wq_buf_size;
> --
> 2.43.0
>