Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Leon Romanovsky <leon@kernel.org>
Cc: linux-rdma@vger.kernel.org, jgg@ziepe.ca, mrgolin@amazon.com,
	 gal.pressman@linux.dev, sleybo@amazon.com, parav@nvidia.com,
	mbloch@nvidia.com,  yanjun.zhu@linux.dev,
	marco.crivellari@suse.com, roman.gushchin@linux.dev,
	 phaddad@nvidia.com, lirongqing@baidu.com, ynachum@amazon.com,
	 huangjunxian6@hisilicon.com,
	kalesh-anakkur.purayil@broadcom.com, ohartoov@nvidia.com,
	 michaelgur@nvidia.com, shayd@nvidia.com, edwards@nvidia.com,
	 sriharsha.basavapatna@broadcom.com,
	andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com
Subject: Re: [PATCH rdma-next v5 00/15] RDMA: Introduce generic buffer descriptor infrastructure for umem
Date: Wed, 20 May 2026 11:07:13 +0200	[thread overview]
Message-ID: <ag15o11ZvBNYqRIC@FV6GYCPJ69> (raw)
In-Reply-To: <20260518133054.GU33515@unreal>

Mon, May 18, 2026 at 03:30:54PM +0200, leon@kernel.org wrote:
>On Sun, May 17, 2026 at 08:29:51AM +0200, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@nvidia.com>
>> 
>> This patchset introduces a generic buffer descriptor infrastructure
>> for passing memory buffers (dma-buf or user VA) to uverbs commands,
>> and wires it up for CQ and QP creation in the uverbs core, efa, mlx5,
>> bnxt_re and mlx4 drivers.
>> 
>> Instead of adding ad-hoc per-buffer UAPI attributes for each new buffer
>> type, each command declares dedicated UVERBS_ATTR_UMEM attributes that
>> carry one buffer descriptor each. Each descriptor specifies a buffer
>> type, covering both VA and dma-buf. A consumption check ensures
>> userspace and driver agree on which attributes are used.
>> 
>> The patchset:
>> 1-2,4. Plumbing: rename ib_umem_get() to ib_umem_get_va() and re-route
>>    it through the new central ib_umem_get(); no behaviour change.
>> 3. Introduces the core buffer descriptor infrastructure and UAPI.
>> 5. Factors out CQ buffer umem processing into a helper.
>> 6. Adds the CQ buffer UMEM attribute and driver wrappers.
>> 7-10. Converts efa, mlx5, bnxt_re and mlx4 to use the new CQ helpers,
>>    with drivers taking umem ownership.
>> 11. Removes the legacy umem field from struct ib_cq, now that all
>>    drivers use the new helpers.
>> 12. Adds optional whole-QP, RQ and SQ UMEM attributes to QP creation.
>> 13. Converts mlx5 QP creation to use the new attributes.
>> 14-15. Adds mlx5 driver-namespace UMEM attributes for CQ and QP
>>    doorbell records.
>> 
>> ---
>> Based on top of: https://lore.kernel.org/all/0-v1-045258567bd6+9fe-ib_uverbs_support_ko_jgg@nvidia.com/
>
>The overall approach looks sane to me.
>
>I have a few minor comments, mostly related to how I expect the
>ib_umem_get_*() helpers to be used:
>
>1. We should hide the ib_umem_get() function and export only
>   ib_umem_get_va(), ib_umem_get_attr(), and
>   ib_umem_get_attr_or_va(). I do not want to see drivers relying on
>   ib_umem_get() again.
>
>2. Pass a struct uverbs_attr_bundle *attrs instead of struct ib_udata
>   *udata to ib_umem_get().
>
>3. Consider simplifying ib_umem_get() further by passing in the desc.
>   I am not fully convinced it helps, but it could allow handling
>   va_fallback outside of ib_umem_get().

Okay, addressing all of that in v6.

Thanks!


      reply	other threads:[~2026-05-20  9:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-17  6:29 [PATCH rdma-next v5 00/15] RDMA: Introduce generic buffer descriptor infrastructure for umem Jiri Pirko
2026-05-17  6:29 ` [PATCH rdma-next v5 01/15] RDMA/umem: Rename ib_umem_get() to ib_umem_get_va() Jiri Pirko
2026-05-17  6:29 ` [PATCH rdma-next v5 02/15] RDMA/umem: Split ib_umem_get_va() into a thin wrapper around __ib_umem_get_va() Jiri Pirko
2026-05-17  6:29 ` [PATCH rdma-next v5 03/15] RDMA/core: Introduce generic buffer descriptor infrastructure for umem Jiri Pirko
2026-05-18 13:04   ` Jacob Moroni
2026-05-18 15:27     ` Jiri Pirko
2026-05-18 18:01     ` Jason Gunthorpe
2026-05-17  6:29 ` [PATCH rdma-next v5 04/15] RDMA/umem: Route ib_umem_get_va() through ib_umem_get() Jiri Pirko
2026-05-17  6:29 ` [PATCH rdma-next v5 05/15] RDMA/uverbs: Push out CQ buffer umem processing into a helper Jiri Pirko
2026-05-17  6:29 ` [PATCH rdma-next v5 06/15] RDMA/uverbs: Add CQ buffer UMEM attribute and driver helpers Jiri Pirko
2026-05-17  6:29 ` [PATCH rdma-next v5 07/15] RDMA/efa: Use ib_umem_get_cq_buf() for user CQ buffer Jiri Pirko
2026-05-17  6:29 ` [PATCH rdma-next v5 08/15] RDMA/mlx5: Use ib_umem_get_cq_buf_or_va() " Jiri Pirko
2026-05-17  6:30 ` [PATCH rdma-next v5 09/15] RDMA/bnxt_re: " Jiri Pirko
2026-05-17  6:30 ` [PATCH rdma-next v5 10/15] RDMA/mlx4: Use ib_umem_get_cq_buf() " Jiri Pirko
2026-05-17  6:30 ` [PATCH rdma-next v5 11/15] RDMA/uverbs: Remove legacy umem field from struct ib_cq Jiri Pirko
2026-05-17  6:30 ` [PATCH rdma-next v5 12/15] RDMA/uverbs: Use UMEM attributes for QP creation Jiri Pirko
2026-05-17  6:30 ` [PATCH rdma-next v5 13/15] RDMA/mlx5: Use UMEM attributes for QP buffers in create_qp Jiri Pirko
2026-05-17  6:30 ` [PATCH rdma-next v5 14/15] RDMA/mlx5: Use UMEM attribute for CQ doorbell record Jiri Pirko
2026-05-17  6:30 ` [PATCH rdma-next v5 15/15] RDMA/mlx5: Use UMEM attribute for QP " Jiri Pirko
2026-05-18 13:30 ` [PATCH rdma-next v5 00/15] RDMA: Introduce generic buffer descriptor infrastructure for umem Leon Romanovsky
2026-05-20  9:07   ` Jiri Pirko [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=ag15o11ZvBNYqRIC@FV6GYCPJ69 \
    --to=jiri@resnulli.us \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=edwards@nvidia.com \
    --cc=gal.pressman@linux.dev \
    --cc=huangjunxian6@hisilicon.com \
    --cc=jgg@ziepe.ca \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lirongqing@baidu.com \
    --cc=marco.crivellari@suse.com \
    --cc=mbloch@nvidia.com \
    --cc=michaelgur@nvidia.com \
    --cc=mrgolin@amazon.com \
    --cc=ohartoov@nvidia.com \
    --cc=parav@nvidia.com \
    --cc=phaddad@nvidia.com \
    --cc=roman.gushchin@linux.dev \
    --cc=selvin.xavier@broadcom.com \
    --cc=shayd@nvidia.com \
    --cc=sleybo@amazon.com \
    --cc=sriharsha.basavapatna@broadcom.com \
    --cc=yanjun.zhu@linux.dev \
    --cc=ynachum@amazon.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