diff mbox

[rdma-core,2/4] mlx5: Add interface to create DC transport QPs

Message ID 1515084561-11374-3-git-send-email-yishaih@mellanox.com (mailing list archive)
State Accepted
Delegated to: Leon Romanovsky
Headers show

Commit Message

Yishai Hadas Jan. 4, 2018, 4:49 p.m. UTC
From: Moni Shoua <monis@mellanox.com>

Extend mlx5dv_create_qp() function to add attributes that are used to
create DC transport QPs, DCT (target) and DCI (initiator).

Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
---
 providers/mlx5/mlx5dv.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox

Patch

diff --git a/providers/mlx5/mlx5dv.h b/providers/mlx5/mlx5dv.h
index 0e78c41..1f9bd0a 100644
--- a/providers/mlx5/mlx5dv.h
+++ b/providers/mlx5/mlx5dv.h
@@ -141,11 +141,23 @@  enum mlx5dv_qp_create_flags {
 
 enum mlx5dv_qp_init_attr_mask {
 	MLX5DV_QP_INIT_ATTR_MASK_QP_CREATE_FLAGS	= 1 << 0,
+	MLX5DV_QP_INIT_ATTR_MASK_DC			= 1 << 1,
+};
+
+enum mlx5dv_dc_type {
+	MLX5DV_DCTYPE_DCT     = 1,
+	MLX5DV_DCTYPE_DCI,
+};
+
+struct mlx5dv_dc_init_attr {
+	enum mlx5dv_dc_type	dc_type;
+	uint64_t dct_access_key;
 };
 
 struct mlx5dv_qp_init_attr {
 	uint64_t comp_mask;	/* Use enum mlx5dv_qp_init_attr_mask */
 	uint32_t create_flags;	/* Use enum mlx5dv_qp_create_flags */
+	struct mlx5dv_dc_init_attr  dc_init_attr;
 };
 
 struct ibv_qp *mlx5dv_create_qp(struct ibv_context *context,