1mlx5dv_create_qp(3)        mlx5 Programmer’s Manual        mlx5dv_create_qp(3)
2
3
4

NAME

6       mlx5dv_create_qp - creates a queue pair (QP)
7

SYNOPSIS

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

DESCRIPTION

16       mlx5dv_create_qp() creates a queue pair (QP) with specific driver prop‐
17       erties.
18

ARGUMENTS

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                  uint64_t send_ops_flags;
28              };
29
30       comp_mask
31              Bitmask specifying what  fields  in  the  structure  are  valid:
32              MLX5DV_QP_INIT_ATTR_MASK_QP_CREATE_FLAGS:  valid  values in cre‐
33              ate_flags   MLX5DV_QP_INIT_ATTR_MASK_DC:   valid    values    in
34              dc_init_attr MLX5DV_QP_INIT_ATTR_MASK_SEND_OPS_FLAGS: valid val‐
35              ues in send_ops_flags
36
37       create_flags
38              A bitwise OR of the various values described below.
39
40              MLX5DV_QP_CREATE_TUNNEL_OFFLOADS:  Enable  offloading  such   as
41              checksum and LRO for incoming tunneling traffic.
42
43              MLX5DV_QP_CREATE_TIR_ALLOW_SELF_LOOPBACK_UC:   Allow   receiving
44              loopback unicast traffic.
45
46              MLX5DV_QP_CREATE_TIR_ALLOW_SELF_LOOPBACK_MC:   Allow   receiving
47              loopback multicast traffic.
48
49              MLX5DV_QP_CREATE_DISABLE_SCATTER_TO_CQE:  Disable scatter to CQE
50              feature which is enabled by default.
51
52              MLX5DV_QP_CREATE_ALLOW_SCATTER_TO_CQE: Allow scatter to CQE  for
53              requester even if the qp was not configured to signal all WRs.
54
55              MLX5DV_QP_CREATE_PACKET_BASED_CREDIT_MODE:  Set  QP  to  work in
56              end-to-end packet-based credit, instead of the default  message-
57              based credits (IB spec.  section 9.7.7.2).
58              It is the applications responsibility to make sure that the peer
59              QP is configured with same mode.
60
61       dc_init_attr
62              DC init attributes.
63
64   dc_init_attr
65              struct mlx5dv_dc_init_attr {
66                  enum mlx5dv_dc_type dc_type;
67                  uint64_t dct_access_key;
68              };
69
70       dc_type
71              MLX5DV_DCTYPE_DCT QP  type:  Target  DC.   MLX5DV_DCTYPE_DCI  QP
72              type: Initiator DC.
73
74       dct_access_key
75              used to create a DCT QP.
76
77       send_ops_flags
78              A bitwise OR of the various values described below.
79
80              MLX5DV_QP_EX_WITH_MR_INTERLEAVED:  Enables  the mlx5dv_wr_mr_in‐
81              terleaved() work requset on this QP.
82
83              MLX5DV_QP_EX_WITH_MR_LIST: Enables the mlx5dv_wr_mr_list()  work
84              requset on this QP.
85

NOTES

87       mlx5dv_qp_ex_from_ibv_qp_ex()  is  used  to get struct mlx5dv_qp_ex for
88       accessing the send ops interfaces when  IBV_QP_INIT_ATTR_SEND_OPS_FLAGS
89       is used.
90
91       The MLX5DV_QP_CREATE_DISABLE_SCATTER_TO_CQE flag should be set in cases
92       that IOVA doesn’t match the process’ VA and the message payload size is
93       small enough to trigger the scatter to CQE feature.
94
95       When  device  memory  is used IBV_SEND_INLINE and scatter to CQE should
96       not be used, as the memcpy is not possible.
97

RETURN VALUE

99       mlx5dv_create_qp() returns a pointer to the created QP, on  error  NULL
100       will be returned and errno will be set.
101

SEE ALSO

103       ibv_query_device_ex(3), ibv_create_qp_ex(3),
104

AUTHOR

106       Yonatan Cohen <yonatanc@mellanox.com>
107
108
109
110mlx5                               2018-9-1                mlx5dv_create_qp(3)
Impressum