From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Yonatan Cohen <yonatanc-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH rdma-rc 2/5] IB/rxe: Fix handling of erroneous WR
Date: Tue, 13 Dec 2016 09:44:41 +0200 [thread overview]
Message-ID: <20161213074441.GE8204@mtr-leonro.local> (raw)
In-Reply-To: <5bd83de1-64d3-e5a9-1c58-cca52d89d64a-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2287 bytes --]
On Tue, Dec 13, 2016 at 08:03:03AM +0100, Bart Van Assche wrote:
> On 11/16/2016 09:39 AM, Leon Romanovsky wrote:
> > @@ -745,13 +746,17 @@ int rxe_requester(void *arg)
> > wqe->status = IB_WC_LOC_PROT_ERR;
> > wqe->state = wqe_state_error;
> >
> > -complete:
> > - if (qp_type(qp) != IB_QPT_RC) {
> > - while (rxe_completer(qp) == 0)
> > - ;
> > - }
> > -
> > - return 0;
> > + /*
> > + * IBA Spec. Section 10.7.3.1 SIGNALED COMPLETIONS
> > + * ---------8<---------8<-------------
> > + * ...Note that if a completion error occurs, a Work Completion
> > + * will always be generated, even if the signaling
> > + * indicator requests an Unsignaled Completion.
> > + * ---------8<---------8<-------------
> > + */
> > + wqe->wr.send_flags |= IB_SEND_SIGNALED;
> > + __rxe_do_task(&qp->comp.task);
> > + return -EAGAIN;
>
> Hello Leon and Yonatan,
>
> Sorry for the late reply but I think setting IB_SEND_SIGNALED for WQE's
> reporting a completion error is wrong.
I'm not clear about it. I didn't find in spec what to do with IB_SEND_SIGNALED
flag in case of error.
According to spec:
"C10-91: The CI shall generate a CQE when a Work Request
completed under any of the following conditions:
• The Work Request completed in error"
> I noticed this because this change
> conflicts with Doug's rxe branch on github. Have you considered to apply
> the following (untested) patch instead of setting the IB_SEND_SIGNALED
> flag?
>
> --- a/drivers/infiniband/sw/rxe/rxe_comp.c
> +++ b/drivers/infiniband/sw/rxe/rxe_comp.c
> @@ -418,7 +418,7 @@ static void do_complete(struct rxe_qp *qp, struct rxe_send_w
> qe *wqe)
>
> if ((qp->sq_sig_type == IB_SIGNAL_ALL_WR) ||
> (wqe->wr.send_flags & IB_SEND_SIGNALED) ||
> - (qp->req.state == QP_STATE_ERROR)) {
> + wqe->status != IB_WC_SUCCESS) {
> make_send_cqe(qp, wqe, &cqe);
> advance_consumer(qp->sq.queue);
> rxe_cq_post(qp->scq, &cqe, 0);
>
> Bart.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2016-12-13 7:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 8:39 [PATCH rdma-rc 0/5] RXE fixes for 4.9 Leon Romanovsky
[not found] ` <1479285558-19627-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-11-16 8:39 ` [PATCH rdma-rc 1/5] IB/rxe: Fix kernel panic in UDP tunnel with GRO and RX checksum Leon Romanovsky
2016-11-16 8:39 ` [PATCH rdma-rc 2/5] IB/rxe: Fix handling of erroneous WR Leon Romanovsky
[not found] ` <1479285558-19627-3-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-13 7:03 ` Bart Van Assche
[not found] ` <5bd83de1-64d3-e5a9-1c58-cca52d89d64a-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-12-13 7:44 ` Leon Romanovsky [this message]
[not found] ` <20161213074441.GE8204-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2016-12-13 8:04 ` Bart Van Assche
[not found] ` <ba254635-c8f9-7b3b-eb73-60075d079542-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-12-13 12:20 ` Leon Romanovsky
2016-11-16 8:39 ` [PATCH rdma-rc 3/5] IB/rxe: Increase max number of completions to 32k Leon Romanovsky
2016-11-16 8:39 ` [PATCH rdma-rc 4/5] IB/rxe: Clear queue buffer when modifying QP to reset Leon Romanovsky
2016-11-16 8:39 ` [PATCH rdma-rc 5/5] IB/rxe: Update qp state for user query Leon Romanovsky
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=20161213074441.GE8204@mtr-leonro.local \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yonatanc-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.