Re: [PATCH rdma-next 4/5] RDMA/irdma: Support UMEM attribute for CQ creation

From: David Hu

Date: Mon Oct 12 2026 - 17:16:00 EST


On Mon, Oct 12, 2026 at 10:17 AM Leon Romanovsky <leon@xxxxxxxxxx> wrote:
>
> On Sun, Oct 11, 2026 at 01:10:21AM +0000, David Hu wrote:

> > diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
> > index ab25445f3828..e4a02a6b2a11 100644
> > --- a/drivers/infiniband/hw/irdma/verbs.c
> > +++ b/drivers/infiniband/hw/irdma/verbs.c
> >
> > @@ -2708,29 +2719,94 @@ static int irdma_create_cq(struct ib_cq *ibcq,
> > if (err_code)
> > goto cq_free_rsrc;
> >
> > - spin_lock_irqsave(&ucontext->cq_reg_mem_list_lock, flags);
> > - iwcq->iwpbl = irdma_get_pbl((unsigned long)req.user_cq_buf,
> > - &ucontext->cq_reg_mem_list);
> > - spin_unlock_irqrestore(&ucontext->cq_reg_mem_list_lock, flags);
> > - if (!iwcq->iwpbl) {
> > - err_code = -EPROTO;
> > - goto cq_free_rsrc;
> > - }
> > + if (attrs && uverbs_attr_is_valid(attrs, UVERBS_ATTR_CREATE_CQ_BUF_UMEM)) {
>
> While making this change, it’s a good opportunity to split
> irdma_create_cq() into kernel and user paths.
>
> Also, please keep commit-message lines around 75–80 characters. There’s no
> need to wrap them at 50 characters.
>

Hi Leon,

Thank you for the review. I'll split `irdma_create_cq()` accordingly
and keep commit message lines around 75-80 for this patch and going
forward. I'll send out a v2 shortly.

Regards,
David