Commit dea4266f authored by Li Zhijian's avatar Li Zhijian Committed by Jason Gunthorpe
Browse files

RDMA/rxe: Update wqe_index for each wqe error completion

Previously, if user space keeps sending abnormal wqe, queue.index will
keep increasing while qp->req.wqe_index doesn't. Once
qp->req.wqe_index==queue.index in next round, req_next_wqe() will treat
queue as empty. In such case, no new completion would be generated.

Update wqe_index for each wqe completion so that req_next_wqe() can get
next wqe properly.

Link: https://lore.kernel.org/r/1658307368-1851-2-git-send-email-lizhijian@fujitsu.com


Signed-off-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent b5605148
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -802,6 +802,8 @@ int rxe_requester(void *arg)
	ret = 0;
	goto out;
err:
	/* update wqe_index for each wqe completion */
	qp->req.wqe_index = queue_next_index(qp->sq.queue, qp->req.wqe_index);
	wqe->state = wqe_state_error;
	rxe_run_task(&qp->comp.task, 0);
exit: