History

RDMA/hns: Support userspace configuring congestion control algorithm with QP granularity

Currently, congestion control algorithm is statically configured in FW, and all QPs use the same algorithm(except UD which has a fixed configuration of DCQCN). This is not flexible enough. Support userspace configuring congestion control algorithm with QP granularity while creating QPs. If the algorithm is not specified in userspace, use the default one.

Junxian Huang committed 2 years ago

Commit 6ec429d1 parent 7a7b7f56 files · +85 −12Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/rdma/hns-abi.h+16−0
@@ -73,6 +73,17 @@ struct hns_roce_ib_create_srq_resp { · 72 unmodified lines
7373 __u32 cap_flags; /* Use enum hns_roce_srq_cap_flags */
7474 };
7575
76+enum hns_roce_congest_type_flags {
77+ HNS_ROCE_CREATE_QP_FLAGS_DCQCN,
78+ HNS_ROCE_CREATE_QP_FLAGS_LDCP,
79+ HNS_ROCE_CREATE_QP_FLAGS_HC3,
80+ HNS_ROCE_CREATE_QP_FLAGS_DIP,
81+};
82+
83+enum hns_roce_create_qp_comp_mask {
84+ HNS_ROCE_CREATE_QP_MASK_CONGEST_TYPE = 1 << 0,
85+};
86+
7687 struct hns_roce_ib_create_qp {
7788 __aligned_u64 buf_addr;
7889 __aligned_u64 db_addr;
@@ -81,6 +92,9 @@ struct hns_roce_ib_create_qp { · 2 unmodified lines
8192 __u8 sq_no_prefetch;
8293 __u8 reserved[5];
8394 __aligned_u64 sdb_addr;
95+ __aligned_u64 comp_mask; /* Use enum hns_roce_create_qp_comp_mask */
96+ __aligned_u64 create_flags;
97+ __aligned_u64 cong_type_flags;
8498 };
8599
86100 enum hns_roce_qp_cap_flags {
@@ -114,6 +128,8 @@ struct hns_roce_ib_alloc_ucontext_resp { · 27 unmodified lines
114128 __u32 reserved;
115129 __u32 config;
116130 __u32 max_inline_data;
131+ __u8 congest_type;
132+ __u8 reserved0[7];
117133 };
118134
119135 struct hns_roce_ib_alloc_ucontext {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t