From d13868688d40281f1da602befb19da850b59b725 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Mon, 30 Oct 2023 16:59:21 +0800
Subject: [PATCH 7/8] Update kernel headers for supporting write with notify

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

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

To commit 7261847876e4 ("RDMA/hns: Support write with notify")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
---
 kernel-headers/rdma/hns-abi.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/kernel-headers/rdma/hns-abi.h b/kernel-headers/rdma/hns-abi.h
index 5969bde..785c4e1 100644
--- a/kernel-headers/rdma/hns-abi.h
+++ b/kernel-headers/rdma/hns-abi.h
@@ -38,6 +38,7 @@
 
 enum hns_roce_create_cq_create_flags {
 	HNS_ROCE_CREATE_CQ_FLAGS_POE_MODE = 1 << 0,
+	HNS_ROCE_CREATE_CQ_FLAGS_WRITE_WITH_NOTIFY = 1 << 1,
 };
 
 struct hns_roce_ib_create_cq {
@@ -47,12 +48,15 @@ struct hns_roce_ib_create_cq {
 	__u32 reserved;
 	__aligned_u64 create_flags; /* Use enum hns_roce_create_cq_create_flags */
 	__u8 poe_channel;
-	__u8 rsv[7];
+	__u8 notify_mode;
+	__u16 notify_idx;
+	__u16 rsv[2];
 };
 
 enum hns_roce_cq_cap_flags {
 	HNS_ROCE_CQ_FLAG_RECORD_DB = 1 << 0,
 	HNS_ROCE_CQ_FLAG_POE_EN = 1 << 2,
+	HNS_ROCE_CQ_FLAG_NOTIFY_EN = 1 << 3,
 };
 
 struct hns_roce_ib_create_cq_resp {
@@ -120,6 +124,7 @@ enum hns_roce_qp_cap_flags {
 	HNS_ROCE_QP_CAP_DIRECT_WQE = 1 << 5,
 	HNS_ROCE_QP_CAP_DYNAMIC_CTX_DETACH = 1 << 6,
 	HNS_ROCE_QP_CAP_STARS_SQ_MODE = 1 << 7,
+	HNS_ROCE_QP_CAP_WRITE_WITH_NOTIFY = 1 << 8,
 };
 
 struct hns_roce_ib_create_qp_resp {
-- 
2.25.1

