mlx5dv_alloc_var - Man Page
Name
mlx5dv_alloc_var ā Allocates a VAR
mlx5dv_free_var ā Frees a VAR
Synopsis
#include <infiniband/mlx5dv.h> struct mlx5dv_var * mlx5dv_alloc_var(struct ibv_context *context, uint32_t flags); void mlx5dv_free_var(struct mlx5dv_var *dv_var);
Description
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.
Arguments
- context
RDMA device context to work on.
- flags
Allocation flags for the UAR.
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.
See Also
Author
Yishai Hadas yishaih@mellanox.com\c
Referenced By
The man page mlx5dv_free_var(3) is an alias of mlx5dv_alloc_var(3).