Re: [PATCH rdma-next v3 1/1] RDMA/mana: Provide a modern CQ creation interface
From: Leon Romanovsky
Date: Sun Mar 22 2026 - 10:01:12 EST
On Wed, Mar 18, 2026 at 10:54:55AM -0700, Konstantin Taranov wrote:
> From: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
>
> The uverbs CQ creation UAPI allows users to supply their own umem for a CQ.
> Create cq->umem if it was not created and use it to create a mana queue.
> The created umem is owned by IB/core and will be deallocated by IB/core.
>
> To support RDMA objects that own umem, introduce mana_ib_create_queue_with_umem()
> to use the umem provided by the caller and do not de-allocate umem if it was allocted
> by the caller.
>
> Signed-off-by: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
> ---
> v3: Make umem allocation explicit for cq->umem and use a new helper to create mana queue from it.
> Remove the universal helper that was added in v2
> v2: Rework of Leon's commit. Introduce univesal helper that returned ownership of umem to caller.
> Added removed u32 overlow check for kernel cq.
> drivers/infiniband/hw/mana/cq.c | 131 ++++++++++++++++++---------
> drivers/infiniband/hw/mana/device.c | 1 +
> drivers/infiniband/hw/mana/main.c | 27 +++---
> drivers/infiniband/hw/mana/mana_ib.h | 5 +-
> 4 files changed, 106 insertions(+), 58 deletions(-)
<...>
> +int mana_ib_create_queue_from_umem(struct mana_ib_dev *mdev, struct ib_umem *umem,
> + struct mana_ib_queue *queue)
> +{
> + queue->umem = NULL;
Two things. First, I'm waiting for Jason to converge on this
ib_copy_*() work. Second, I still believe drivers should not cache
umem.
Thanks