From: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>
To: Cheng Xu <chengyou@linux.alibaba.com>,
Zhu Yanjun <zyjzyj2000@gmail.com>, Jason Gunthorpe <jgg@ziepe.ca>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] RDMA/rxe: Generate error completion for error requester state
Date: Wed, 11 May 2022 08:36:01 +0000 [thread overview]
Message-ID: <0eb4cdcb-4d9b-18a6-a030-59bb2b359c2e@fujitsu.com> (raw)
In-Reply-To: <b37c53a7-86df-0283-1a77-c31af108d39f@linux.alibaba.com>
On 11/05/2022 11:44, Cheng Xu wrote:
>
>
> On 5/11/22 10:30 AM, Li Zhijian wrote:
>> SoftRoCE always returns success when user space is posting a new wqe where
>> it usually just enqueues a wqe.
>>
>> Once the requester state becomes QP_STATE_ERROR, we should generate error
>> completion for all subsequent wqe. So the user is able to poll the
>> completion event to check if the former wqe is handled correctly.
>>
>> Here we check QP_STATE_ERROR after req_next_wqe() so that the completion
>> can associate with its wqe.
>>
>> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
>> ---
>> drivers/infiniband/sw/rxe/rxe_req.c | 10 +++++++++-
>> 1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
>> index 8bdd0b6b578f..ed6a486c4343 100644
>> --- a/drivers/infiniband/sw/rxe/rxe_req.c
>> +++ b/drivers/infiniband/sw/rxe/rxe_req.c
>> @@ -624,7 +624,7 @@ int rxe_requester(void *arg)
>> rxe_get(qp);
>> next_wqe:
>> - if (unlikely(!qp->valid || qp->req.state == QP_STATE_ERROR))
>> + if (unlikely(!qp->valid))
>> goto exit;
>> if (unlikely(qp->req.state == QP_STATE_RESET)) {
>> @@ -646,6 +646,14 @@ int rxe_requester(void *arg)
>> if (unlikely(!wqe))
>> goto exit;
>> + if (qp->req.state == QP_STATE_ERROR) {
>> + /*
>> + * Generate an error completion so that user space is able to
>> + * poll this completion.
>> + */
>> + goto err;
>> + }
>> +
>
> Should this still use unlikely(...) ? Because the original judgement has
> a unlikely surrounded.
Good catch. it sounds good :)
Thanks
Zhijian
>
> Cheng Xu
>
>> if (wqe->mask & WR_LOCAL_OP_MASK) {
>> ret = rxe_do_local_ops(qp, wqe);
>> if (unlikely(ret))
next prev parent reply other threads:[~2022-05-11 8:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 2:30 [PATCH v2 0/2] RDMA/rxe: Fix no completion event issue Li Zhijian
2022-05-11 2:30 ` [PATCH v2 1/2] RDMA/rxe: Update wqe_index for each wqe error completion Li Zhijian
2022-05-11 2:30 ` [PATCH v2 2/2] RDMA/rxe: Generate error completion for error requester state Li Zhijian
2022-05-11 3:44 ` Cheng Xu
2022-05-11 8:36 ` lizhijian [this message]
2022-05-11 12:50 ` Haakon Bugge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0eb4cdcb-4d9b-18a6-a030-59bb2b359c2e@fujitsu.com \
--to=lizhijian@fujitsu.com \
--cc=chengyou@linux.alibaba.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=zyjzyj2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®