mlx5dv_free_var3
Allocates a var mlx5dv_free_var - frees a var
Part of mlx5dv_alloc_var(3).
Overview
Create / free a VAR which can be used for some device commands over the DEVX interface.
The DEVX API enables direct access from the user space area to the mlx5 device driver, the VAR information is needed for few commands related to Virtio.
The VAR type used depends on the flags argument.
Arguments
- context
-
RDMA device context to work on.
- flags
-
Allocation flags for the VAR. 0: Allocate a standard VirtIO VAR. MLX5DV_VAR_ALLOC_FLAG_TLP: Allocate a TLP VAR for TLP emulation.
dv_var
-
struct mlx5dv_var { uint32_t page_id; uint32_t length; off_t mmap_off; uint64_t comp_mask; };
- page_id
-
The device page id to be used.
- length
-
The mmap length parameter to be used for mapping a VA to the allocated VAR entry.
- mmap_off
-
The mmap offset parameter to be used for mapping a VA to the allocated VAR entry.
Return value
Upon success mlx5dv_alloc_var returns a pointer to the created VAR ,on error NULL will be returned and errno will be set.
History
- Arch Linux 2026-11-01: the text shown here
- Debian 13 (Trixie)
- Debian 12 (Bookworm)
- Debian 11 (Bullseye)