.\" Automatically generated by Pandoc 2.5
.\"
.TH "mlx5dv_devx_alloc_uar / mlx5dv_devx_free_uar" "3" "" "" ""
.hy
.SH NAME
.PP
mlx5dv_devx_alloc_uar \- Allocates a DEVX UAR
.PP
mlx5dv_devx_free_uar \- Frees a DEVX UAR
.SH SYNOPSIS
.IP
.nf
\f[C]
#include <infiniband/mlx5dv.h>

struct mlx5dv_devx_uar *mlx5dv_devx_alloc_uar(struct ibv_context *context,
                                              uint32_t flags);

void mlx5dv_devx_free_uar(struct mlx5dv_devx_uar *devx_uar);
\f[R]
.fi
.SH DESCRIPTION
.PP
Create / free a DEVX UAR which is needed for other device commands over
the DEVX interface.
.PP
The DEVX API enables direct access from the user space area to the mlx5
device driver, the UAR information is needed for few commands as of QP
creation.
.SH ARGUMENTS
.TP
.B \f[I]context\f[R]
RDMA device context to work on.
.TP
.B \f[I]flags\f[R]
Allocation flags for the UAR.
.SS devx_uar
.IP
.nf
\f[C]
struct mlx5dv_devx_uar {
    void *reg_addr;
    void *base_addr;
    uint32_t page_id;
    off_t mmap_off;
    uint64_t comp_mask;
};
\f[R]
.fi
.TP
.B \f[I]reg_addr\f[R]
The write address of DB/BF.
.TP
.B \f[I]base_addr\f[R]
The base address of the UAR.
.TP
.B \f[I]page_id\f[R]
The device page id to be used.
.TP
.B \f[I]mmap_off\f[R]
The mmap offset parameter to be used for re\-mapping, to be used by a
secondary process.
.SH RETURN VALUE
.PP
Upon success \f[I]mlx5dv_devx_alloc_uar\f[R] will return a new
\f[I]struct mlx5dv_devx_uar\f[R], 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]
.PP
#AUTHOR
.PP
Yishai Hadas <yishaih@mellanox.com>
