.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "mlx5dv_alloc_var / mlx5dv_free_var" "3" "" "" "" .hy .SH NAME .PP mlx5dv_alloc_var - Allocates a VAR .PP mlx5dv_free_var - Frees a VAR .SH SYNOPSIS .IP .nf \f[C] #include struct mlx5dv_var * mlx5dv_alloc_var(struct ibv_context *context, uint32_t flags); void mlx5dv_free_var(struct mlx5dv_var *dv_var); \f[R] .fi .SH DESCRIPTION .PP Create / free a VAR which can be used for some device commands over the DEVX interface. .PP 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. .SH ARGUMENTS .TP \f[I]context\f[R] RDMA device context to work on. .TP \f[I]flags\f[R] Allocation flags for the UAR. .SS dv_var .IP .nf \f[C] struct mlx5dv_var { uint32_t page_id; uint32_t length; off_t mmap_off; uint64_t comp_mask; }; \f[R] .fi .TP \f[I]page_id\f[R] The device page id to be used. .TP \f[I]length\f[R] The mmap length parameter to be used for mapping a VA to the allocated VAR entry. .TP \f[I]mmap_off\f[R] The mmap offset parameter to be used for mapping a VA to the allocated VAR entry. .SH RETURN VALUE .PP Upon success \f[I]mlx5dv_alloc_var\f[R] returns a pointer to the created VAR ,on error NULL will be returned and errno will be set. .SH SEE ALSO .PP \f[B]mlx5dv_open_device\f[R], \f[B]mlx5dv_devx_obj_create\f[R] .SH AUTHOR .PP Yishai Hadas