Added the use of direct verbs to implement QP-level user-configurable congestion control algorithms. Among them, the user mode driver mainly provides interfaces for users to choose, and the kernel mode driver is responsible for filling the resources of different algorithms and providing the supported algorithm types for user mode. At the same time, provide a direct verbs interface for users to query the type of congestion control algorithm. Signed-off-by: Juan Zhou <zhoujuan51@h-partners.com> (cherry picked from commit 48ccef6ba011468fe91056398aad863f998569d2)
61 lines
1.7 KiB
Diff
61 lines
1.7 KiB
Diff
From 39c7b8eaeb3a6c855a49885b6b6de877268d36a7 Mon Sep 17 00:00:00 2001
|
|
From: Yixing Liu <liuyixing1@huawei.com>
|
|
Date: Wed, 12 Apr 2023 17:01:08 +0800
|
|
Subject: [PATCH 1/2] Update kernel headers
|
|
|
|
To commit ?? ("RDMA/hns: Support congestion control algorithm
|
|
configuration at QP granularity").
|
|
|
|
Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
|
|
Reviewed-by: Yangyang Li <liyangyang20@huawei.com>
|
|
---
|
|
kernel-headers/rdma/hns-abi.h | 18 +++++++++++++++++-
|
|
1 file changed, 17 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/kernel-headers/rdma/hns-abi.h b/kernel-headers/rdma/hns-abi.h
|
|
index 5988a62..bd19927 100644
|
|
--- a/kernel-headers/rdma/hns-abi.h
|
|
+++ b/kernel-headers/rdma/hns-abi.h
|
|
@@ -63,6 +63,18 @@ struct hns_roce_ib_create_srq_resp {
|
|
__u32 reserved;
|
|
};
|
|
|
|
+enum hns_roce_create_qp_comp_mask {
|
|
+ HNS_ROCE_CREATE_QP_MASK_CREATE_FLAGS = 1 << 0,
|
|
+ HNS_ROCE_CREATE_QP_MASK_CONGEST_TYPE = 1 << 1,
|
|
+};
|
|
+
|
|
+enum hns_roce_congest_type_flags {
|
|
+ HNS_ROCE_CREATE_QP_FLAGS_DCQCN = 1 << 0,
|
|
+ HNS_ROCE_CREATE_QP_FLAGS_LDCP = 1 << 1,
|
|
+ HNS_ROCE_CREATE_QP_FLAGS_HC3 = 1 << 2,
|
|
+ HNS_ROCE_CREATE_QP_FLAGS_DIP = 1 << 3,
|
|
+};
|
|
+
|
|
struct hns_roce_ib_create_qp {
|
|
__aligned_u64 buf_addr;
|
|
__aligned_u64 db_addr;
|
|
@@ -71,6 +83,9 @@ struct hns_roce_ib_create_qp {
|
|
__u8 sq_no_prefetch;
|
|
__u8 reserved[5];
|
|
__aligned_u64 sdb_addr;
|
|
+ __aligned_u64 comp_mask;
|
|
+ __aligned_u64 create_flags;
|
|
+ __aligned_u64 congest_type_flags;
|
|
};
|
|
|
|
enum hns_roce_qp_cap_flags {
|
|
@@ -123,7 +138,8 @@ struct hns_roce_ib_alloc_ucontext_resp {
|
|
__u32 config;
|
|
__u32 max_inline_data;
|
|
__u8 mac_type;
|
|
- __u8 rsv1[7];
|
|
+ __u8 congest_type;
|
|
+ __u8 rsv1[6];
|
|
__u32 dca_qps;
|
|
__u32 dca_mmap_size;
|
|
__aligned_u64 dca_mmap_key;
|
|
--
|
|
2.25.1
|
|
|