]> www.infradead.org Git - nvme.git/commitdiff
RDMA/hns: Remove the condition of light load for posting DWQE
authorYixian Liu <liuyixian@huawei.com>
Wed, 28 Apr 2021 07:12:30 +0000 (15:12 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 11 May 2021 16:15:22 +0000 (13:15 -0300)
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")
Link: https://lore.kernel.org/r/1619593950-29414-1-git-send-email-liweihang@huawei.com
Signed-off-by: Yixian Liu <liuyixian@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c

index 7652dafe32eca61f9b7417f1101a1461514845f1..49bb4f51466cb20d0dd253c0612d18c0ccf3fbbc 100644 (file)
@@ -791,8 +791,7 @@ out:
                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);