Data Center Quantized Congestion Notification (DCQCN) is a congestion control protocol for large scale RDMA networks. In order to support it, The design of hip08 add a Sofware Congestion Control(SCC) module, which support flow control of 1M QPs. The driver implements the following works: 1. Allocate memory for SCC, which is used for flow contrl info of QPs. 2. Initialize SCC, memory should be clear before used. 3. Allocate memory for timeout retransmission for accurating retransmission interval. This patchset depends on the patchset("[PATCH for-next 0/6] Some bugfixes for hns") Change from v4: 1. Solve combination of "break" and "return" constructions in the same switch<->case, "return" was replaced by "break" in hns_roce_v2_set_hem() and hns_roce_v2_clear_hem(). 2. Rename "SCC_CTX" to "SCCC" to match other naming styles. 3. Add sccc bt allocation for vf in hns_roce_alloc_vf_resource(), because vf is already supported. 4. Delete Redundant memset operations in hns_roce_v2_qp_flow_control_init(), because these variables have been cleared in hns_roce_cmq_setup_basic_desc(). 5. Add mutex to ensure the security of concurrent operations in hns_roce_v2_qp_flow_control_init(). Change from v3: 1. Change qpc_timer_table from struct hns_roce_qpc_timer_table to struct hns_roce_hem_table, and struct hns_roce_qpc_timer_table was delete. 2. Change cqc_timer_table from struct hns_roce_cqc_timer_table to struct hns_roce_hem_table, and struct hns_roce_cqc_timer_table was delete. Change from v2: 1. Add changelog 2. Add note for depending on the other patchset. Change from v1: 1. Separate it from the original patchset("hns misc updates for 4.20") Yangyang Li (3): RDMA/hns: Add SCC context allocation support for hip08 RDMA/hns: Add SCC context clr support for hip08 RDMA/hns: Add timer allocation support for hip08 drivers/infiniband/hw/hns/hns_roce_cmd.h | 12 ++ drivers/infiniband/hw/hns/hns_roce_device.h | 24 ++++ drivers/infiniband/hw/hns/hns_roce_hem.c | 68 ++++++++- drivers/infiniband/hw/hns/hns_roce_hem.h | 3 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 206 +++++++++++++++++++++++++++- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 72 +++++++++- drivers/infiniband/hw/hns/hns_roce_main.c | 54 ++++++++ drivers/infiniband/hw/hns/hns_roce_qp.c | 28 +++- 8 files changed, 457 insertions(+), 10 deletions(-) -- 1.9.1