IB/mlx5: Handle type IB_QPT_DRIVER when creating a QP

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.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Moni Shoua
2018-01-02 16:19:31 +02:00
committed by Jason Gunthorpe
parent 8011c1e336
commit b4aaa1f0b4
3 changed files with 118 additions and 2 deletions

View File

@@ -42,6 +42,8 @@ enum {
MLX5_QP_FLAG_SCATTER_CQE = 1 << 1,
MLX5_QP_FLAG_TUNNEL_OFFLOADS = 1 << 2,
MLX5_QP_FLAG_BFREG_INDEX = 1 << 3,
MLX5_QP_FLAG_TYPE_DCT = 1 << 4,
MLX5_QP_FLAG_TYPE_DCI = 1 << 5,
};
enum {
@@ -284,7 +286,10 @@ struct mlx5_ib_create_qp {
__u32 flags;
__u32 uidx;
__u32 bfreg_index;
__u64 sq_buf_addr;
union {
__u64 sq_buf_addr;
__u64 access_key;
};
};
/* RX Hash function flags */