Skip to content

Commit

Permalink
RDMA/rxe: Update wqe_index for each wqe error completion
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
zhijianli88 authored and jgunthorpe committed Aug 2, 2022
1 parent b560514 commit dea4266
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/infiniband/sw/rxe/rxe_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit dea4266

Please sign in to comment.