From patchwork Mon Jul 12 06:07:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 475767 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17789C07E9E for ; Mon, 12 Jul 2021 07:11:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F05E56121F for ; Mon, 12 Jul 2021 07:11:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239723AbhGLHNx (ORCPT ); Mon, 12 Jul 2021 03:13:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:47878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240099AbhGLHMn (ORCPT ); Mon, 12 Jul 2021 03:12:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0EC7E610FA; Mon, 12 Jul 2021 07:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626073794; bh=7ZGpz8llyWui7Z9BbsoSQs+FUFVD67qfNy5qg8f+6q8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ghHzkSQaqfqcCmTSHy7K6eUsW2V42GO1gFO83kzAt/JTdbVjZnIjRoQ0zOoN02KMz BExhr4EQbVi0nBv6OjdoXYAf190vP2C350NFsVEFqD6OA88cjhv/Cuo4jGTFe/ktSu qY2T1CKnqOB/27hyORx26zUjjtZeSzJ6glCAemYs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yixian Liu , Weihang Li , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.12 363/700] RDMA/hns: Remove the condition of light load for posting DWQE Date: Mon, 12 Jul 2021 08:07:26 +0200 Message-Id: <20210712061014.994788047@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yixian Liu [ 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 Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index ad3cee54140e..3344b80ecf04 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -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);