mlx5dv_devx_umem_reg_ex3
Register a user memory to be used by the devx interface mlx5dv_devx_umem_reg_ex - register a user memory to be used by the devx interface mlx5dv_devx_umem_dereg - deregister a devx umem object
Part of mlx5dv_devx_umem_reg(3).
Overview
Register or deregister a user memory to be used by the devx interface.
The register verb exposes a UMEM DEVX object for user memory registration for DMA. The API to register the user memory gets as input the user address, length and access flags, and provides to the user as output an object which holds the UMEM ID returned by the firmware to this registered memory.
The user can ask for specific page sizes for the given address and length, in that case mlx5dv_devx_umem_reg_ex() should be used. In case the kernel couldn’t find a matching page size from the given umem_in->pgsz_bitmap bitmap the API will fail.
The user will use that UMEM ID in device direct commands that use this memory instead of the physical addresses list, for example upon mlx5dv_devx_obj_create to create a QP.
Arguments
- context
-
RDMA device context to create the action on.
- addr
-
The memory start address to register.
- size
-
The size of *addr* buffer.
- access
-
The desired memory protection attributes; it is either 0 or the bitwise OR of one or more of enum ibv_access_flags.
- umem_in
-
A structure holds the argument bundle.
- pgsz_bitmap
-
Represents the required page sizes. umem creation will fail if it cannot be created with these page sizes.
- comp_mask
-
Flags indicating the additional fields.
- dmabuf_fd
-
If MLX5DV_UMEM_MASK_DMABUF is set in comp_mask then this value must be a FD of a dmabuf. In this mode the dmabuf is used as the backing memory to create the umem out of. The dmabuf must be pinnable. addr is interpreted as the starting offset of the dmabuf.
Return value
Upon success mlx5dv_devx_umem_reg / mlx5dv_devx_umem_reg_ex will return a new struct mlx5dv_devx_umem object, on error NULL will be returned and errno will be set.
mlx5dv_devx_umem_dereg returns 0 on success, or the value of errno on failure (which indicates the failure reason).
History
- Arch Linux 2026-11-01: the text shown here
- Debian 13 (Trixie)
- Debian 12 (Bookworm)