RDMA/hns: Update some configurations related to hardware
Subsystems (2)
cover RDMA/hns: Update some configurations related to hardware
These configurations in hns drivers should be updated to adapt capability of hardware or improve performance.
Jihua Tao (1):
RDMA/hns: Reduce PFC frames in congestion scenarios
Lang Cheng (2):
RDMA/hns: Reduce the maximum number of extend SGE per WQE RDMA/hns: Modify the mask of QP number for CQE of hip08
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-)
Signature · 1 line
2.8.1
PATCH 1/3 RDMA/hns: Reduce PFC frames in congestion scenarios
From: Jihua Tao <[email protected]>
The original value means sending 16 packets at a time, and it should be configured to 0 which means sending 1 packet instead. It is modified to reduce the number of PFC frames to make sure the performance meets expectations when flow control is enabled on hip08.
--- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +1 -1
@@ -4188,7 +4188,7 @@ static int modify_qp_init_to_rtr(struct ib_qp *ibqp,/* mtu*(2^LP_PKTN_INI) should not bigger than 1 message length 64kb */ roce_set_field (context->byte_56_dqpn_err,V2_QPC_BYTE_56_LP_PKTN_INI_M , -V2_QPC_BYTE_56_LP_PKTN_INI_S ,4 ); +V2_QPC_BYTE_56_LP_PKTN_INI_S ,0 );roce_set_field (qpc_mask->byte_56_dqpn_err,V2_QPC_BYTE_56_LP_PKTN_INI_M ,V2_QPC_BYTE_56_LP_PKTN_INI_S ,0 );
Signature · 1 line
2.8.1
PATCH 2/3 RDMA/hns: Reduce the maximum number of extend SGE per WQE
In reply to Weihang LiFrom: Lang Cheng <[email protected]>
Just reduce the default number to 64 for backward compatibility, the driver can still get this configuration from the firmware.
--- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/infiniband/hw/hns/hns_roce_hw_v2.h +3 -4
@@ -50,15 +50,14 @@#define HNS_ROCE_V2_MAX_WQE_NUM 0x8000#define HNS_ROCE_V2_MAX_SRQ 0x100000#define HNS_ROCE_V2_MAX_SRQ_WR 0x8000 -#define HNS_ROCE_V2_MAX_SRQ_SGE 0x100 +#define HNS_ROCE_V2_MAX_SRQ_SGE 64#define HNS_ROCE_V2_MAX_CQ_NUM 0x100000#define HNS_ROCE_V2_MAX_CQC_TIMER_NUM 0x100#define HNS_ROCE_V2_MAX_SRQ_NUM 0x100000#define HNS_ROCE_V2_MAX_CQE_NUM 0x400000#define HNS_ROCE_V2_MAX_SRQWQE_NUM 0x8000 -#define HNS_ROCE_V2_MAX_RQ_SGE_NUM 0x100 -#define HNS_ROCE_V2_MAX_SQ_SGE_NUM 0xff -#define HNS_ROCE_V2_MAX_SRQ_SGE_NUM 0x100 +#define HNS_ROCE_V2_MAX_RQ_SGE_NUM 64 +#define HNS_ROCE_V2_MAX_SQ_SGE_NUM 64#define HNS_ROCE_V2_MAX_EXTEND_SGE_NUM 0x200000#define HNS_ROCE_V2_MAX_SQ_INLINE 0x20#define HNS_ROCE_V2_UAR_NUM 256
Signature · 1 line
2.8.1
PATCH 3/3 RDMA/hns: Modify the mask of QP number for CQE of hip08
In reply to Weihang LiFrom: Lang Cheng <[email protected]>
The hip08 supports up to 1M QPs, so the qpn mask of cqe should be modified.
--- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/hns/hns_roce_hw_v2.h +1 -1
@@ -162,7 +162,7 @@ enum {#define GID_LEN_V2 16 -#define HNS_ROCE_V2_CQE_QPN_MASK 0x3ffff +#define HNS_ROCE_V2_CQE_QPN_MASK 0xfffffenum {HNS_ROCE_V2_WQE_OP_SEND =0x0 ,
Signature · 1 line
2.8.1
Jason Gunthorpe
AppliedQuoted 9 lines · Weihang Li
These configurations in hns drivers should be updated to adapt capability of hardware or improve performance.
Jihua Tao (1):
RDMA/hns: Reduce PFC frames in congestion scenariosLang Cheng (2):
RDMA/hns: Reduce the maximum number of extend SGE per WQE RDMA/hns: Modify the mask of QP number for CQE of hip08
Applied to for-next
Thanks,
Jason