public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Konstantin Taranov <kotaranov@linux.microsoft.com>
Cc: kotaranov@microsoft.com, shirazsaleem@microsoft.com,
	longli@microsoft.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH rdma-next 1/1] RDMA/mana_ib: UC QP support for UAPI
Date: Thu, 19 Mar 2026 13:04:23 +0200	[thread overview]
Message-ID: <20260319110423.GK352386@unreal> (raw)
In-Reply-To: <20260319103901.1472588-1-kotaranov@linux.microsoft.com>

On Thu, Mar 19, 2026 at 03:39:01AM -0700, Konstantin Taranov wrote:
> From: Konstantin Taranov <kotaranov@microsoft.com>
> 
> 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@microsoft.com>
> ---
>  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
> 

      reply	other threads:[~2026-03-19 11:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 10:39 [PATCH rdma-next 1/1] RDMA/mana_ib: UC QP support for UAPI Konstantin Taranov
2026-03-19 11:04 ` Leon Romanovsky [this message]

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=20260319110423.GK352386@unreal \
    --to=leon@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=kotaranov@linux.microsoft.com \
    --cc=kotaranov@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=shirazsaleem@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