Skip to contentSkip to conversation

RDMA/hns: Remove the condition of light load for posting DWQE

PATCH Applied Weihang Li 2 participants 2 messages Apr 28, 2021 – May 11, 2021

Subsystems (2)
lore
Share & tools
lore

Weihang Li

author
#0 lore raw

PATCH 1/1 RDMA/hns: Remove the condition of light load for posting DWQE

From: Yixian Liu <[email protected]>

Even in the case of heavy load, direct WQE can still be posted. The hardware will decide whether to drop the DWQE or not. Thus, the limit needs to be removed.

Fixes 01584a5edcc4 ("RDMA/hns: Add support of direct wqe")
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +1 -2
index edcfd39..fd546fd 100644
@@ -791,8 +791,7 @@ static int hns_roce_v2_post_send(struct ib_qp *ibqp,
 		qp->sq.head += nreq;
 		qp->next_sge = sge_idx;
 
-		if (nreq == 1 && qp->sq.head == qp->sq.tail + 1 &&
-		    (qp->en_flags & HNS_ROCE_QP_CAP_DIRECT_WQE))
+		if (nreq == 1 && (qp->en_flags & HNS_ROCE_QP_CAP_DIRECT_WQE))
 			write_dwqe(hr_dev, qp, wqe);
 		else
 			update_sq_db(hr_dev, qp);
Signature · 1 line
2.8.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Weihang Li

From: Yixian Liu <[email protected]>

Even in the case of heavy load, direct WQE can still be posted. The hardware will decide whether to drop the DWQE or not. Thus, the limit needs to be removed.

Quoted 6 lines
Fixes 01584a5edcc4 ("RDMA/hns: Add support of direct wqe")
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-next, thanks

Jason