mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-21 06:50:25 +00:00
RDMA/rxe: Generate error completion for error requester QP state
As per IBTA specification, all subsequent WQEs while QP is in error state should be completed with a flush error. Here we check QP_STATE_ERROR after req_next_wqe() so that rxe_completer() has chance to be called where it will set CQ state to FLUSH ERROR and the completion can associate with its WQE. Link: https://lore.kernel.org/r/1658307368-1851-3-git-send-email-lizhijian@fujitsu.com Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
dea4266f7b
commit
ae720bdb70
1 changed files with 12 additions and 1 deletions
|
@ -635,9 +635,20 @@ int rxe_requester(void *arg)
|
||||||
if (!rxe_get(qp))
|
if (!rxe_get(qp))
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
|
||||||
if (unlikely(!qp->valid || qp->req.state == QP_STATE_ERROR))
|
if (unlikely(!qp->valid))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
if (unlikely(qp->req.state == QP_STATE_ERROR)) {
|
||||||
|
wqe = req_next_wqe(qp);
|
||||||
|
if (wqe)
|
||||||
|
/*
|
||||||
|
* Generate an error completion for error qp state
|
||||||
|
*/
|
||||||
|
goto err;
|
||||||
|
else
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (unlikely(qp->req.state == QP_STATE_RESET)) {
|
if (unlikely(qp->req.state == QP_STATE_RESET)) {
|
||||||
qp->req.wqe_index = queue_get_consumer(q,
|
qp->req.wqe_index = queue_get_consumer(q,
|
||||||
QUEUE_TYPE_FROM_CLIENT);
|
QUEUE_TYPE_FROM_CLIENT);
|
||||||
|
|
Loading…
Add table
Reference in a new issue