1mlx5dv_devx_umem_reg, mlx5dv_devmxl_xu5mdevm__ddeevrxe_gu(m3e)m_reg, mlx5dv_devx_umem_dereg(3)
2
3
4
6 mlx5dv_devx_umem_reg - Register a user memory to be used by the devx
7 interface
8
9 mlx5dv_devx_umem_reg_ex - Register a user memory to be used by the devx
10 interface
11
12 mlx5dv_devx_umem_dereg - Deregister a devx umem object
13
15 #include <infiniband/mlx5dv.h>
16
17 struct mlx5dv_devx_umem {
18 uint32_t umem_id;
19 };
20
21 struct mlx5dv_devx_umem *
22 mlx5dv_devx_umem_reg(struct ibv_context *context, void *addr, size_t size,
23 uint32_t access)
24
25 struct mlx5dv_devx_umem_in {
26 void *addr;
27 size_t size;
28 uint32_t access;
29 uint64_t pgsz_bitmap;
30 uint64_t comp_mask;
31 };
32
33 struct mlx5dv_devx_umem *
34 mlx5dv_devx_umem_reg_ex(struct ibv_context *ctx, struct mlx5dv_devx_umem_in *umem_in);
35
36 int mlx5dv_devx_umem_dereg(struct mlx5dv_devx_umem *dv_devx_umem)
37
39 Register or deregister a user memory to be used by the devx interface.
40
41 The register verb exposes a UMEM DEVX object for user memory registra‐
42 tion for DMA. The API to register the user memory gets as input the
43 user address, length and access flags, and provides to the user as out‐
44 put an object which holds the UMEM ID returned by the firmware to this
45 registered memory.
46
47 The user can ask for specific page sizes for the given address and
48 length, in that case mlx5dv_devx_umem_reg_ex() should be used. In case
49 the kernel couldn’t find a matching page size from the given
50 umem_in->pgsz_bitmap bitmap the API will fail.
51
52 The user will use that UMEM ID in device direct commands that use this
53 memory instead of the physical addresses list, for example upon
54 mlx5dv_devx_obj_create to create a QP.
55
57 context
58
59 RDMA device context to create the action on.
60
61 addr The memory start address to register.
62
63 size
64
65 The size of *addr* buffer.
66
67 access The desired memory protection attributes; it is either 0 or the
68 bitwise OR of one or more of enum ibv_access_flags.
69
70 umem_in
71 A structure holds the legacy arguments in addition to a
72 pgsz_bitmap field which represents the required page sizes. A
73 comp_mask field was added for future use, for now must be 0.
74
76 Upon success mlx5dv_devx_umem_reg / mlx5dv_devx_umem_reg_ex will return
77 a new struct mlx5dv_devx_umem object, on error NULL will be returned
78 and errno will be set.
79
80 mlx5dv_devx_umem_dereg returns 0 on success, or the value of errno on
81 failure (which indicates the failure reason).
82
84 mlx5dv_open_device(3), ibv_reg_mr(3), mlx5dv_devx_obj_create(3)
85
86 #AUTHOR
87
88 Yishai Hadas <yishaih@mellanox.com>
89
90
91
92 mlx5dv_devx_umem_reg, mlx5dv_devx_umem_dereg(3)