Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Liu Jian <liujian56@huawei.com>
To: <zyjzyj2000@gmail.com>, <yanjun.zhu@linux.dev>, <jgg@ziepe.ca>,
	<leon@kernel.org>, <rpearsonhpe@gmail.com>, <kamalh@mellanox.com>,
	<haggaie@mellanox.com>, <dledford@redhat.com>,
	<monis@mellanox.com>, <amirv@mellanox.com>
Cc: <linux-rdma@vger.kernel.org>, <liujian56@huawei.com>
Subject: [PATCH rdma v2] RDMA/rxe: Set queue pair cur_qp_state when being queried
Date: Thu, 31 Oct 2024 17:20:19 +0800	[thread overview]
Message-ID: <20241031092019.2138467-1-liujian56@huawei.com> (raw)

Same with commit e375b9c92985 ("RDMA/cxgb4: Set queue pair state when
 being queried"). The API for ib_query_qp requires the driver to set
cur_qp_state on return, add the missing set.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Liu Jian <liujian56@huawei.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
v1: https://patchwork.kernel.org/project/linux-rdma/patch/20240809083148.1989912-5-liujian56@huawei.com/
 drivers/infiniband/sw/rxe/rxe_qp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index d2f7b5195c19..91d329e90308 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -775,6 +775,7 @@ int rxe_qp_to_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask)
 	 * Yield the processor
 	 */
 	spin_lock_irqsave(&qp->state_lock, flags);
+	attr->cur_qp_state = qp_state(qp);
 	if (qp->attr.sq_draining) {
 		spin_unlock_irqrestore(&qp->state_lock, flags);
 		cond_resched();
-- 
2.34.1


             reply	other threads:[~2024-10-31  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-31  9:20 Liu Jian [this message]
2024-11-03 14:59 ` [PATCH rdma v2] RDMA/rxe: Set queue pair cur_qp_state when being queried Leon Romanovsky
2024-11-12  7:58 ` '[v6,0/8] Fix the problem that rxe can not work in net namespace' Cyclinder Kuo
2024-11-12  8:50   ` Leon Romanovsky

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=20241031092019.2138467-1-liujian56@huawei.com \
    --to=liujian56@huawei.com \
    --cc=amirv@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=haggaie@mellanox.com \
    --cc=jgg@ziepe.ca \
    --cc=kamalh@mellanox.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=monis@mellanox.com \
    --cc=rpearsonhpe@gmail.com \
    --cc=yanjun.zhu@linux.dev \
    --cc=zyjzyj2000@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox