All of lore.kernel.org
 help / color / mirror / Atom feed
From: Weihang Li <liweihang@huawei.com>
To: <dledford@redhat.com>, <jgg@nvidia.com>
Cc: <leon@kernel.org>, <linux-rdma@vger.kernel.org>,
	<linuxarm@huawei.com>, Yixing Liu <liuyixing1@huawei.com>,
	Weihang Li <liweihang@huawei.com>
Subject: [PATCH for-next 09/10] RDMA/hns: Simplify the judgment in hns_roce_v2_post_send()
Date: Fri, 18 Jun 2021 18:10:19 +0800	[thread overview]
Message-ID: <1624011020-16992-10-git-send-email-liweihang@huawei.com> (raw)
In-Reply-To: <1624011020-16992-1-git-send-email-liweihang@huawei.com>

From: Yixing Liu <liuyixing1@huawei.com>

The QP type has been checked in check_send_valid(), if it's not RC, it will
process the UD/GSI branch.

Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 921899f..cd641cb 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -755,10 +755,10 @@ static int hns_roce_v2_post_send(struct ib_qp *ibqp,
 		       ~(((qp->sq.head + nreq) >> ilog2(qp->sq.wqe_cnt)) & 0x1);
 
 		/* Corresponding to the QP type, wqe process separately */
-		if (ibqp->qp_type == IB_QPT_GSI || ibqp->qp_type == IB_QPT_UD)
-			ret = set_ud_wqe(qp, wr, wqe, &sge_idx, owner_bit);
-		else if (ibqp->qp_type == IB_QPT_RC)
+		if (ibqp->qp_type == IB_QPT_RC)
 			ret = set_rc_wqe(qp, wr, wqe, &sge_idx, owner_bit);
+		else
+			ret = set_ud_wqe(qp, wr, wqe, &sge_idx, owner_bit);
 
 		if (unlikely(ret)) {
 			*bad_wr = wr;
-- 
2.7.4


  parent reply	other threads:[~2021-06-18 10:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 10:10 [PATCH for-next 00/10] RDMA/hns: Updates for 5.14 Weihang Li
2021-06-18 10:10 ` [PATCH for-next 01/10] RDMA/hns: Force rewrite inline flag of WQE Weihang Li
2021-06-18 10:10 ` [PATCH for-next 02/10] RDMA/hns: Fix uninitialized variable Weihang Li
2021-06-18 10:10 ` [PATCH for-next 03/10] RDMA/hns: Fix some print issues Weihang Li
2021-06-18 10:10 ` [PATCH for-next 04/10] RDMA/hns: Add member assignments for qp_init_attr Weihang Li
2021-06-18 10:10 ` [PATCH for-next 05/10] RDMA/hns: Delete unnecessary branch of hns_roce_v2_query_qp Weihang Li
2021-06-18 10:10 ` [PATCH for-next 06/10] RDMA/hns: Clean definitions of EQC structure Weihang Li
2021-06-18 10:10 ` [PATCH for-next 07/10] RDMA/hns: Modify function return value type Weihang Li
2021-06-18 10:10 ` [PATCH for-next 08/10] RDMA/hns: Encapsulate flushing CQE as a function Weihang Li
2021-06-18 10:10 ` Weihang Li [this message]
2021-06-18 10:10 ` [PATCH for-next 10/10] RDMA/hns: Fix spelling mistakes of original Weihang Li
2021-06-22 18:25 ` [PATCH for-next 00/10] RDMA/hns: Updates for 5.14 Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1624011020-16992-10-git-send-email-liweihang@huawei.com \
    --to=liweihang@huawei.com \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liuyixing1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.