mlx5dv_devx_allo...dv_devx_free_uar(3)

πŸ’– NAME πŸ’–

okay bestie, this is the mlx5dv_devx_allo...dv_devx_free_uar(3) page β€” manual name: mlx5dv_devx_allo...dv_devx_free_uar(3), same iconic abbreviated header energy. It's giving two functions and one UAR lifecycle:

  • mlx5dv_devx_alloc_uar β€” Allocates a DEVX UAR
  • mlx5dv_devx_free_uar β€” Frees a DEVX UAR

πŸ¦‹ SYNOPSIS πŸ¦‹

              #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);

🌸 DESCRIPTION 🌸

Create / free a DEVX UAR which is needed for other device commands over the DEVX interface. Lowkey essential.

The DEVX API enables direct access from the user space area to the mlx5 device driver, and the UAR information is needed for few commands as of QP creation. No cap.

πŸŽ€ ARGUMENTS πŸŽ€

  • context β€” RDMA device context to work on. That's the vibe.
  • flags β€” Allocation flags for the UAR. The choices are:
    • 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.

🧚 devx_uar 🧚

              struct mlx5dv_devx_uar {
                  void *reg_addr;
                  void *base_addr;
                  uint32_t page_id;
                  off_t mmap_off;
                  uint64_t comp_mask;
              };
  • reg_addr β€” The write address of DB/BF.
  • base_addr β€” The base address of the UAR.
  • page_id β€” The device page id to be used.
  • mmap_off β€” The mmap offset parameter to be used for re-mapping, to be used by a secondary process.

🫢 RETURN VALUE 🫢

Upon success mlx5dv_devx_alloc_uar will return a new struct mlx5dv_devx_uar, on error NULL will be returned and errno will be set. Periodt.

πŸ”₯ SEE ALSO πŸ”₯

  • mlx5dv_open_device
  • mlx5dv_devx_obj_create

πŸ‘‘ AUTHOR πŸ‘‘

Yishai Hadas <yishaih@mellanox.com>


Sign-off bestie: this page's footer is just mlx5dv_devx_allo...dv_devx_free_uar(3) β€” same as the header, with no extra source/version/date shown in the original. πŸ’…βœ¨

πŸ“¦ where this page comes from