From bd53382cfbc0f1b1b5636dd9b425d546d98079b1 Mon Sep 17 00:00:00 2001
From: Juan Zhou <zhoujuan51@h-partners.com>
Date: Sat, 11 May 2024 14:23:19 +0800
Subject: [PATCH 33/33] libhns: Fix missing flag when creating qp by
 hnsdv_create_qp()

driver inclusion
category: bugfix
bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/I9NZME

--------------------------------------------------------------------------

This flag will be used when the DCA mode is enabled. Without this flag,
the QP fails to be created in DCA mode.

Fixes: c7bf0dbf472d ("libhns: Introduce DCA for RC QP")
Signed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
---
 providers/hns/hns_roce_u_verbs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c
index a680339..e30880c 100644
--- a/providers/hns/hns_roce_u_verbs.c
+++ b/providers/hns/hns_roce_u_verbs.c
@@ -1049,7 +1049,8 @@ int hns_roce_u_destroy_srq(struct ibv_srq *ibv_srq)
 }
 
 enum {
-	HNSDV_QP_SUP_COMP_MASK = HNSDV_QP_INIT_ATTR_MASK_QP_CONGEST_TYPE,
+	HNSDV_QP_SUP_COMP_MASK = HNSDV_QP_INIT_ATTR_MASK_QP_CREATE_FLAGS |
+				 HNSDV_QP_INIT_ATTR_MASK_QP_CONGEST_TYPE,
 };
 
 static int check_hnsdv_qp_attr(struct hns_roce_context *ctx,
-- 
2.33.0

