.\" 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_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 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 \f[I]context\f[R] RDMA device context to work on. .TP \f[I]flags\f[R] Allocation flags for the UAR. MLX5DV_UAR_ALLOC_TYPE_BF: Allocate UAR with Blueflame properties. MLX5DV_UAR_ALLOC_TYPE_NC: Allocate UAR with non-cache properties. MLX5DV_UAR_ALLOC_TYPE_NC_DEDICATED: Allocate a dedicated UAR with non-cache properties. .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 \f[I]reg_addr\f[R] The write address of DB/BF. .TP \f[I]base_addr\f[R] The base address of the UAR. .TP \f[I]page_id\f[R] The device page id to be used. .TP \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