1mlx5dv_create_qp(3) mlx5 Programmer's Manual mlx5dv_create_qp(3)
2
3
4
6 mlx5dv_create_qp - creates a queue pair (QP)
7
9 #include <infiniband/mlx5dv.h>
10
11 struct ibv_qp *mlx5dv_create_qp(struct ibv_context *context,
12 struct ibv_qp_init_attr_ex *qp_attr,
13 struct mlx5dv_qp_init_attr *mlx5_qp_attr)
14
16 mlx5dv_create_qp() creates a queue pair (QP) with specific driver prop‐
17 erties.
18
20 Please see ibv_create_qp_ex(3) man page for context and qp_attr.
21
22 mlx5_qp_attr
23 struct mlx5dv_qp_init_attr {
24 uint64_t comp_mask;
25 uint32_t create_flags;
26 struct mlx5dv_dc_init_attr dc_init_attr;
27 };
28
29 comp_mask
30 Bitmask specifying what fields in the structure are valid:
31 MLX5DV_QP_INIT_ATTR_MASK_QP_CREATE_FLAGS: valid values in cre‐
32 ate_flags MLX5DV_QP_INIT_ATTR_MASK_DC: valid values in
33 dc_init_attr
34
35 create_flags
36 A bitwise OR of the various values described below.
37
38 MLX5DV_QP_CREATE_TUNNEL_OFFLOADS: Enable offloading such as
39 checksum and LRO for incoming tunneling traffic.
40
41 MLX5DV_QP_CREATE_TIR_ALLOW_SELF_LOOPBACK_UC: Allow receiving
42 loopback unicast traffic.
43
44 MLX5DV_QP_CREATE_TIR_ALLOW_SELF_LOOPBACK_MC: Allow receiving
45 loopback multicast traffic.
46
47 MLX5DV_QP_CREATE_DISABLE_SCATTER_TO_CQE: Disable scatter to CQE
48 feature which is enabled by default.
49
50 MLX5DV_QP_CREATE_ALLOW_SCATTER_TO_CQE: Allow scatter to CQE for
51 requester even if the qp was not configured to signal all WRs.
52
53 MLX5DV_QP_CREATE_PACKET_BASED_CREDIT_MODE: Set QP to work in
54 end-to-end packet-based credit, instead of the default mes‐
55 sage-based credits (IB spec. section 9.7.7.2).
56 It is the applications responsibility to make sure that the peer
57 QP is configured with same mode.
58
59 dc_init_attr
60 DC init attributes.
61
62 dc_init_attr
63 struct mlx5dv_dc_init_attr {
64 enum mlx5dv_dc_type dc_type;
65 uint64_t dct_access_key;
66 };
67
68 dc_type
69 MLX5DV_DCTYPE_DCT QP type: Target DC. MLX5DV_DCTYPE_DCI QP
70 type: Initiator DC.
71
72 dct_access_key
73 used to create a DCT QP.
74
76 mlx5dv_create_qp() returns a pointer to the created QP, on error NULL
77 will be returned and errno will be set.
78
80 ibv_query_device_ex(3), ibv_create_qp_ex(3),
81
83 Yonatan Cohen <yonatanc@mellanox.com>
84
85
86
87mlx5 2018-9-1 mlx5dv_create_qp(3)