Skip to content

Commit ae720bd

Browse files
zhijianli88jgunthorpe
authored andcommitted
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>
1 parent dea4266 commit ae720bd

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Diff for: drivers/infiniband/sw/rxe/rxe_req.c

+12-1
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,20 @@ int rxe_requester(void *arg)
635635
if (!rxe_get(qp))
636636
return -EAGAIN;
637637

638-
if (unlikely(!qp->valid || qp->req.state == QP_STATE_ERROR))
638+
if (unlikely(!qp->valid))
639639
goto exit;
640640

641+
if (unlikely(qp->req.state == QP_STATE_ERROR)) {
642+
wqe = req_next_wqe(qp);
643+
if (wqe)
644+
/*
645+
* Generate an error completion for error qp state
646+
*/
647+
goto err;
648+
else
649+
goto exit;
650+
}
651+
641652
if (unlikely(qp->req.state == QP_STATE_RESET)) {
642653
qp->req.wqe_index = queue_get_consumer(q,
643654
QUEUE_TYPE_FROM_CLIENT);

0 commit comments

Comments
 (0)