diff mbox series

[rdma,v2] RDMA/rxe: Set queue pair cur_qp_state when being queried

Message ID 20241031092019.2138467-1-liujian56@huawei.com (mailing list archive)
State New
Headers show
Series [rdma,v2] RDMA/rxe: Set queue pair cur_qp_state when being queried | expand

Commit Message

Liu Jian Oct. 31, 2024, 9:20 a.m. UTC
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 mbox series

Patch

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();