All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: bmt@zurich.ibm.com, jgg@ziepe.ca, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, guoqing.jiang@linux.dev
Subject: [PATCH 4/4] RDMA/siw: Call orq_get_current if possible
Date: Wed, 29 Nov 2023 11:24:18 +0800	[thread overview]
Message-ID: <20231129032418.26705-5-guoqing.jiang@linux.dev> (raw)
In-Reply-To: <20231129032418.26705-1-guoqing.jiang@linux.dev>

We can call it in siw_orq_empty.

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
---
 drivers/infiniband/sw/siw/siw.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/siw/siw.h b/drivers/infiniband/sw/siw/siw.h
index 2edba2a864bb..75253f2b3e3d 100644
--- a/drivers/infiniband/sw/siw/siw.h
+++ b/drivers/infiniband/sw/siw/siw.h
@@ -657,7 +657,7 @@ static inline struct siw_sqe *orq_get_free(struct siw_qp *qp)
 
 static inline int siw_orq_empty(struct siw_qp *qp)
 {
-	return qp->orq[qp->orq_get % qp->attrs.orq_size].flags == 0 ? 1 : 0;
+	return orq_get_current(qp)->flags == 0 ? 1 : 0;
 }
 
 static inline struct siw_sqe *irq_alloc_free(struct siw_qp *qp)
-- 
2.35.3


  parent reply	other threads:[~2023-11-29  3:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29  3:24 [PATCH 0/4] Misc changes for siw Guoqing Jiang
2023-11-29  3:24 ` [PATCH 1/4] RDMA/siw: Move tx_cpu ahead Guoqing Jiang
2023-12-01 15:43   ` Bernard Metzler
2023-11-29  3:24 ` [PATCH 2/4] RDMA/siw: Reduce memory usage of struct siw_rx_stream Guoqing Jiang
2023-12-01 15:43   ` Bernard Metzler
2023-11-29  3:24 ` [PATCH 3/4] RDMA/siw: Set qp_state in siw_query_qp Guoqing Jiang
2023-11-30 18:09   ` Bernard Metzler
2023-12-01  1:29     ` Guoqing Jiang
2023-11-29  3:24 ` Guoqing Jiang [this message]
2023-12-01 15:47   ` [PATCH 4/4] RDMA/siw: Call orq_get_current if possible Bernard Metzler
2023-12-03  9:15     ` Guoqing Jiang

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=20231129032418.26705-5-guoqing.jiang@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=bmt@zurich.ibm.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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.