Skip to contentSkip to conversation

RDMA/hns: Fix incorrect lsn field

PATCH In review Weihang Li 1 participant 2 messages Jun 22, 2021

Subsystems (2)
lore
Share & tools
lore

Weihang Li

author
#0 lore raw

PATCH 1/1 RDMA/hns: Fix incorrect lsn field

From: Yixing Liu <[email protected]>

In RNR NAK screnario, according to the specification, when no credit is available, only the first fragment of the send request can be sent. The LSN(Limit Sequence Number) field should be 0 or the entire packet will be resent.

Fixes f0cb411aad23 ("RDMA/hns: Use new interface to modify QP context")
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 -
 1 file changed, 1 deletion(-)
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +0 -1
index 069c7cd..7da2a74 100644
@@ -4515,7 +4515,6 @@ static int modify_qp_rtr_to_rts(struct ib_qp *ibqp,
 
 	hr_reg_clear(qpc_mask, QPC_CHECK_FLG);
 
-	hr_reg_write(context, QPC_LSN, 0x100);
 	hr_reg_clear(qpc_mask, QPC_LSN);
 
 	hr_reg_clear(qpc_mask, QPC_V2_IRRL_HEAD);
Signature · 1 line
2.7.4
author
#1 lore raw
Quoted 19 lines · liweihang

From: Yixing Liu <[email protected]>

In RNR NAK screnario, according to the specification, when no credit is available, only the first fragment of the send request can be sent. The LSN(Limit Sequence Number) field should be 0 or the entire packet will be resent.

Fixes f0cb411aad23 ("RDMA/hns: Use new interface to modify QP context")
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 -
 1 file changed, 1 deletion(-)
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +0 -0
index 069c7cd..7da2a74 100644

drivers/infiniband/hw/hns/hns_roce_hw_v2.c static int modify_qp_rtr_to_rts(struct ib_qp *ibqp, · line 4519

Quoted 6 lines
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +0 -1
@@ -4515,7 +4515,6 @@ static int modify_qp_rtr_to_rts(struct ib_qp *ibqp,
 
 	hr_reg_clear(qpc_mask, QPC_CHECK_FLG);
 
-	hr_reg_write(context, QPC_LSN, 0x100);
 	hr_reg_clear(qpc_mask, QPC_LSN);
 

This hr_reg_clear() is redundant and needs to be removed. I will resend this patch.

Weihang

Quoted 2 lines
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +0 -0
 	hr_reg_clear(qpc_mask, QPC_V2_IRRL_HEAD);