Commit 775e6d3c authored by Liu Jian's avatar Liu Jian Committed by Leon Romanovsky
Browse files

RDMA/rxe: Set queue pair cur_qp_state when being queried



Same with commit e375b9c9 ("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: 8700e3e7 ("Soft RoCE driver")
Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
Link: https://patch.msgid.link/20241031092019.2138467-1-liujian56@huawei.com


Reviewed-by: default avatarZhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 1103579d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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();