The QP type IB_QPT_DRIVER doesn't describe the transport or the service that the QP provides but those are known only to the hardware driver. The actual type of the QP is stored in the hardware driver context (i.e. mlx5_qp) under the field qp_sub_type. Take the real QP type and any extra data that is required to create the QP from the driver channel and modify the QP initial attributes before continuing with create_qp(). Downstream patches from this series will add support for both DCI and DCT driver QPs.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -42,6 +42,8 @@ enum { · 41 unmodified lines | ||
| 42 | 42 | MLX5_QP_FLAG_SCATTER_CQE = 1 << 1, |
| 43 | 43 | MLX5_QP_FLAG_TUNNEL_OFFLOADS = 1 << 2, |
| 44 | 44 | MLX5_QP_FLAG_BFREG_INDEX = 1 << 3, |
| 45 | + MLX5_QP_FLAG_TYPE_DCT = 1 << 4, | |
| 46 | + MLX5_QP_FLAG_TYPE_DCI = 1 << 5, | |
| 45 | 47 | }; |
| 46 | 48 | |
| 47 | 49 | enum { |
| @@ -284,7 +286,10 @@ struct mlx5_ib_create_qp { · 236 unmodified lines | ||
| 284 | 286 | __u32 flags; |
| 285 | 287 | __u32 uidx; |
| 286 | 288 | __u32 bfreg_index; |
| 287 | − __u64 sq_buf_addr; | |
| 289 | + union { | |
| 290 | + __u64 sq_buf_addr; | |
| 291 | + __u64 access_key; | |
| 292 | + }; | |
| 288 | 293 | }; |
| 289 | 294 | |
| 290 | 295 | /* RX Hash function flags */ |