Skip to content

Commit dea4266

Browse files
zhijianli88jgunthorpe
authored andcommitted
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/[email protected] Signed-off-by: Li Zhijian <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent b560514 commit dea4266

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/infiniband/sw/rxe/rxe_req.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,8 @@ int rxe_requester(void *arg)
802802
ret = 0;
803803
goto out;
804804
err:
805+
/* update wqe_index for each wqe completion */
806+
qp->req.wqe_index = queue_next_index(qp->sq.queue, qp->req.wqe_index);
805807
wqe->state = wqe_state_error;
806808
rxe_run_task(&qp->comp.task, 0);
807809
exit:

0 commit comments

Comments
 (0)