Re: [PATCH rdma-next v2 1/1] RDMA/mana_ib: UC QP support for UAPI

From: Jason Gunthorpe

Date: Thu Apr 09 2026 - 09:40:47 EST


On Wed, Mar 25, 2026 at 03:18:43AM -0700, Konstantin Taranov wrote:
> +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)
> +{
> + struct mana_ib_dev *mdev = container_of(ibpd->device, struct mana_ib_dev, ib_dev);
> + struct mana_ib_qp *qp = container_of(ibqp, struct mana_ib_qp, ibqp);
> + struct mana_ib_create_uc_qp_resp resp = {};
> + struct mana_ib_ucontext *mana_ucontext;
> + struct mana_ib_create_uc_qp ucmd = {};
> + u64 flags = 0;
> + u32 doorbell;
> + int err, i;
> +
> + if (!udata || udata->inlen < sizeof(ucmd))
> + return -EINVAL;
> +
> + mana_ucontext = rdma_udata_to_drv_context(udata, struct mana_ib_ucontext, ibucontext);
> + doorbell = mana_ucontext->doorbell;
> +
> + err = ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen));
> + if (err)
> + return err;

This all needs to be revised to use the new udata helpers

And you need to audit the driver and set
IB_UVERBS_CORE_SUPPORT_ROBUST_UDATA before adding new uAPI changes

Thanks,
Jason