From: Bob Pearson <rpearsonhpe@gmail.com>
To: jgg@nvidia.com, zyjzyj2000@gmail.com, leon@kernel.org,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/rxe: Send last wqe reached event on qp cleanup
Date: Fri, 2 Jun 2023 11:43:33 -0500 [thread overview]
Message-ID: <dd87f075-e0f9-7fea-e134-6dd5167c8334@gmail.com> (raw)
In-Reply-To: <20230602164042.9240-1-rpearsonhpe@gmail.com>
Sorry ignore this one. I forgot the for-next.
Bob
On 6/2/23 11:40, Bob Pearson wrote:
> The IBA requires:
> o11-5.2.5: If the HCA supports SRQ, for RC and UD service,
> the CI shall generate a Last WQE Reached Affiliated Asynchronous
> Event on a QP that is in the Error State and is associated with
> an SRQ when either:
> • a CQE is generated for the last WQE, or
> • the QP gets in the Error State and there are no more
> WQEs on the RQ.
>
> This patch implements this behavior in flush_recv_queue() which is
> called as a result of rxe_qp_error() being called whenever the qp
> is put into the error state. The rxe responder executes SRQ WQEs
> directly from the SRQ so there are never more WQES on the RQ.
>
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> ---
> drivers/infiniband/sw/rxe/rxe_resp.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
> index 172c8f916470..0c24facd12cb 100644
> --- a/drivers/infiniband/sw/rxe/rxe_resp.c
> +++ b/drivers/infiniband/sw/rxe/rxe_resp.c
> @@ -1492,8 +1492,17 @@ static void flush_recv_queue(struct rxe_qp *qp, bool notify)
> struct rxe_recv_wqe *wqe;
> int err;
>
> - if (qp->srq)
> + if (qp->srq) {
> + if (notify && qp->ibqp.event_handler) {
> + struct ib_event ev;
> +
> + ev.device = qp->ibqp.device;
> + ev.element.qp = &qp->ibqp;
> + ev.event = IB_EVENT_QP_LAST_WQE_REACHED;
> + qp->ibqp.event_handler(&ev, qp->ibqp.qp_context);
> + }
> return;
> + }
>
> while ((wqe = queue_head(q, q->type))) {
> if (notify) {
prev parent reply other threads:[~2023-06-02 16:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 16:40 [PATCH] RDMA/rxe: Send last wqe reached event on qp cleanup Bob Pearson
2023-06-02 16:43 ` Bob Pearson [this message]
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=dd87f075-e0f9-7fea-e134-6dd5167c8334@gmail.com \
--to=rpearsonhpe@gmail.com \
--cc=jgg@nvidia.com \
--cc=leon@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 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.