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.
Showing the changes to include/uapi (1 of 6 files). Show all
Unified · Split
| @@ -73,6 +73,17 @@ struct hns_roce_ib_create_srq_resp { · 72 unmodified lines | |||
| 73 | __u32 cap_flags; /* Use enum hns_roce_srq_cap_flags */ | 73 | __u32 cap_flags; /* Use enum hns_roce_srq_cap_flags */ |
| 74 | }; | 74 | }; |
| 75 | 75 | ||
| 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 | |||
| 76 | struct hns_roce_ib_create_qp { | 87 | struct hns_roce_ib_create_qp { |
| 77 | __aligned_u64 buf_addr; | 88 | __aligned_u64 buf_addr; |
| 78 | __aligned_u64 db_addr; | 89 | __aligned_u64 db_addr; |
| @@ -81,6 +92,9 @@ struct hns_roce_ib_create_qp { · 2 unmodified lines | |||
| 81 | __u8 sq_no_prefetch; | 92 | __u8 sq_no_prefetch; |
| 82 | __u8 reserved[5]; | 93 | __u8 reserved[5]; |
| 83 | __aligned_u64 sdb_addr; | 94 | __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; | ||
| 84 | }; | 98 | }; |
| 85 | 99 | ||
| 86 | enum hns_roce_qp_cap_flags { | 100 | enum hns_roce_qp_cap_flags { |
| @@ -114,6 +128,8 @@ struct hns_roce_ib_alloc_ucontext_resp { · 27 unmodified lines | |||
| 114 | __u32 reserved; | 128 | __u32 reserved; |
| 115 | __u32 config; | 129 | __u32 config; |
| 116 | __u32 max_inline_data; | 130 | __u32 max_inline_data; |
| 131 | __u8 congest_type; | ||
| 132 | __u8 reserved0[7]; | ||
| 117 | }; | 133 | }; |
| 118 | 134 | ||
| 119 | struct hns_roce_ib_alloc_ucontext { | 135 | struct hns_roce_ib_alloc_ucontext { |