Re: [PATCH rdma-next v3 03/13] RDMA/core: report the reliable unconnected device capabilities

From: Michael Margolin

Date: Mon Nov 16 2026 - 09:38:32 EST


On Mon, Nov 09, 2026 at 08:00:36PM -0800, Eric Davis wrote:
> Add the capability bits a device uses to advertise reliable unconnected
> support alongside additional features: the transport itself, 64-bit
> immediate data, 64-bit memory keys, caller-chosen keys, and the four
> memory region access restrictions.
>
> Report the job, job key, and address table limits through the extended
> query_device response so userspace can size against them.
>
> Signed-off-by: Eric Davis <eric.davis@xxxxxxxxxxxx>
> ---
> drivers/infiniband/core/uverbs_cmd.c | 3 +++
> include/rdma/ib_verbs.h | 14 ++++++++++++++
> include/uapi/rdma/ib_user_verbs.h | 27 +++++++++++++++++++++++++++
> 3 files changed, 44 insertions(+)
>

> diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h
> index 565301594634..df3e72aee9a8 100644
> --- a/include/uapi/rdma/ib_user_verbs.h
> +++ b/include/uapi/rdma/ib_user_verbs.h
> @@ -300,6 +300,10 @@ struct ib_uverbs_ex_query_device_resp {
> __aligned_u64 max_dm_size;
> __u32 xrc_odp_caps;
> __u32 reserved;
> + __u32 max_job_ids; /* jobs allocated at once, not a JobID */
> + __u32 max_job_keys; /* job keys allocated at once */
> + __u32 max_addr_entries; /* largest address table of one job */
> + __u32 reserved2;
> };
>
> struct ib_uverbs_query_port {
> @@ -1370,6 +1374,29 @@ enum ib_uverbs_device_cap_flags {
> IB_UVERBS_DEVICE_ATOMIC_WRITE = 1ULL << 40,
> /* CoCo guest with DMA bounce buffering required */
> IB_UVERBS_DEVICE_CC_DMA_BOUNCE = 1ULL << 41,
> + /* Reliable unconnected QPs, jobs, job keys and address tables */
> + IB_UVERBS_DEVICE_RU = 1ULL << 42,

Does RU have to imply jobs? Leaving out the job ops works fine: the objects disappear and alloc_job
returns EOPNOTSUPP. The only way userspace can tell is max_job_ids == 0, though.

Would a separate cap bit for jobs make sense, so IB_UVERBS_DEVICE_RU means just the QP type?

Michael