]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:59:45 +0000 (16:59 +0200)
[ Upstream commit 591f762b2750c628df9412d1c795b56e83a34b3e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c

index ad3cee54140e13b7f482e03150db1eb264696aab..3344b80ecf047b7bb1f8a74f1b2583b81f6de1ef 100644 (file)
@@ -750,8 +750,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);