* [PATCH for-next 1/3] RDMA/hns: Reduce PFC frames in congestion scenarios
2020-03-26 3:40 [PATCH for-next 0/3] RDMA/hns: Update some configurations related to hardware Weihang Li
@ 2020-03-26 3:40 ` Weihang Li
2020-03-26 3:40 ` [PATCH for-next 2/3] RDMA/hns: Reduce the maximum number of extend SGE per WQE Weihang Li
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Weihang Li @ 2020-03-26 3:40 UTC (permalink / raw)
To: dledford, jgg; +Cc: leon, linux-rdma, linuxarm
From: Jihua Tao <taojihua4@huawei.com>
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.
Signed-off-by: Jihua Tao <taojihua4@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 9bd8fbf..943f88c 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -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);
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH for-next 2/3] RDMA/hns: Reduce the maximum number of extend SGE per WQE
2020-03-26 3:40 [PATCH for-next 0/3] RDMA/hns: Update some configurations related to hardware Weihang Li
2020-03-26 3:40 ` [PATCH for-next 1/3] RDMA/hns: Reduce PFC frames in congestion scenarios Weihang Li
@ 2020-03-26 3:40 ` Weihang Li
2020-03-26 3:40 ` [PATCH for-next 3/3] RDMA/hns: Modify the mask of QP number for CQE of hip08 Weihang Li
2020-03-29 14:09 ` [PATCH for-next 0/3] RDMA/hns: Update some configurations related to hardware Jason Gunthorpe
3 siblings, 0 replies; 5+ messages in thread
From: Weihang Li @ 2020-03-26 3:40 UTC (permalink / raw)
To: dledford, jgg; +Cc: leon, linux-rdma, linuxarm
From: Lang Cheng <chenglang@huawei.com>
Just reduce the default number to 64 for backward compatibility, the driver
can still get this configuration from the firmware.
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
index 2a117ff..4f90ef7 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
@@ -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
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH for-next 3/3] RDMA/hns: Modify the mask of QP number for CQE of hip08
2020-03-26 3:40 [PATCH for-next 0/3] RDMA/hns: Update some configurations related to hardware Weihang Li
2020-03-26 3:40 ` [PATCH for-next 1/3] RDMA/hns: Reduce PFC frames in congestion scenarios Weihang Li
2020-03-26 3:40 ` [PATCH for-next 2/3] RDMA/hns: Reduce the maximum number of extend SGE per WQE Weihang Li
@ 2020-03-26 3:40 ` Weihang Li
2020-03-29 14:09 ` [PATCH for-next 0/3] RDMA/hns: Update some configurations related to hardware Jason Gunthorpe
3 siblings, 0 replies; 5+ messages in thread
From: Weihang Li @ 2020-03-26 3:40 UTC (permalink / raw)
To: dledford, jgg; +Cc: leon, linux-rdma, linuxarm
From: Lang Cheng <chenglang@huawei.com>
The hip08 supports up to 1M QPs, so the qpn mask of cqe should be modified.
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
index 4f90ef7..dd8f93d 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.h
@@ -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 0xfffff
enum {
HNS_ROCE_V2_WQE_OP_SEND = 0x0,
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH for-next 0/3] RDMA/hns: Update some configurations related to hardware
2020-03-26 3:40 [PATCH for-next 0/3] RDMA/hns: Update some configurations related to hardware Weihang Li
` (2 preceding siblings ...)
2020-03-26 3:40 ` [PATCH for-next 3/3] RDMA/hns: Modify the mask of QP number for CQE of hip08 Weihang Li
@ 2020-03-29 14:09 ` Jason Gunthorpe
3 siblings, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2020-03-29 14:09 UTC (permalink / raw)
To: Weihang Li; +Cc: dledford, leon, linux-rdma, linuxarm
On Thu, Mar 26, 2020 at 11:40:15AM +0800, Weihang Li wrote:
> 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
Applied to for-next
Thanks,
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread