1mlx5dv_alloc_dm(3) mlx5 Programmer’s Manual mlx5dv_alloc_dm(3)
2
3
4
6 mlx5dv_alloc_dm - allocates device memory (DM)
7
9 #include <infiniband/mlx5dv.h>
10
11 struct ibv_dm *mlx5dv_alloc_dm(struct ibv_context *context,
12 struct ibv_alloc_dm_attr *dm_attr,
13 struct mlx5dv_alloc_dm_attr *mlx5_dm_attr)
14
16 mlx5dv_alloc_dm() allocates device memory (DM) with specific driver
17 properties.
18
20 Please see ibv_alloc_dm(3) man page for context and dm_attr.
21
22 mlx5_dm_attr
23 struct mlx5dv_alloc_dm_attr {
24 enum mlx5dv_alloc_dm_type type;
25 uint64_t comp_mask;
26 };
27
28 type The device memory type user wishes to allocate:
29
30 MLX5DV_DM_TYPE_MEMIC Device memory of type MEMIC - On-Chip memo‐
31 ry that can be allocated and used as memory region for transmit‐
32 ting/receiving packet directly from/to the memory on the chip.
33
34 MLX5DV_DM_TYPE_STEERING_SW_ICM Device memory of type STEERING SW
35 ICM - This memory is used by the device to store the packet
36 steering tables and rules. Can be used for direct table and
37 steering rules creation when allocated by a privileged user.
38
39 MLX5DV_DM_TYPE_HEADER_MODIFY_SW_ICM Device memory of type HEADER
40 MODIFY SW ICM - This memory is used by the device to store the
41 packet header modification tables and rules. Can be used for
42 direct table and header modification rules creation when allo‐
43 cated by a privileged user.
44
45 comp_mask
46 Bitmask specifying what fields in the structure are valid: Cur‐
47 rently reserved and should be set to 0.
48
50 mlx5dv_alloc_dm() returns a pointer to the created DM, on error NULL
51 will be returned and errno will be set.
52
54 ibv_alloc_dm(3),
55
57 Ariel Levkovich <lariel@mellanox.com>
58
59
60
61mlx5 2018-9-1 mlx5dv_alloc_dm(3)