Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH v2 2/3] nvme-rdma: don't complete requests before a send work request has completed
Date: Mon, 20 Nov 2017 12:16:40 +0100	[thread overview]
Message-ID: <20171120111640.GA32043@lst.de> (raw)
In-Reply-To: <df9c9545-7c00-328b-9f98-535d8e889715@grimberg.me>

> +       if (wc->wc_flags & IB_WC_WITH_INVALIDATE) {
> +               if (unlikely(wc->ex.invalidate_rkey == req->mr->rkey)) {

The == here should be a != I think.

> +                       dev_err(queue->ctrl->ctrl.device,
> +                               "Bogus remote invalidation for rkey %#x\n",
> +                               req->mr->rkey);
> +                       nvme_rdma_error_recovery(queue->ctrl);
> +               }
>                 req->mr->need_inval = false;
> -               refcount_dec(&req->ref);
>         } else if (req->mr->need_inval) {
>                 ret = nvme_rdma_inv_rkey(queue, req);
>                 if (unlikely(ret < 0)) {
> @@ -1347,6 +1349,8 @@ static int nvme_rdma_process_nvme_rsp(struct 
> nvme_rdma_queue *queue,
>                                 req->mr->rkey, ret);
>                         nvme_rdma_error_recovery(queue->ctrl);
>                 }
> +               /* return here as we can't really end the request */
> +               return 0;

Maybe replace the comment with

		/* the local invalidation completion will end the request */

Otherwise this looks fine to me.

  reply	other threads:[~2017-11-20 11:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 10:06 [PATCH v2 0/3] Fix request completion holes Sagi Grimberg
2017-11-08 10:06 ` [PATCH v2 1/3] nvme-rdma: don't suppress send completions Sagi Grimberg
2017-11-09  9:18   ` Christoph Hellwig
2017-11-09 11:08     ` Sagi Grimberg
2017-11-20  8:18       ` Christoph Hellwig
2017-11-20  8:33         ` Sagi Grimberg
2017-11-20  9:32           ` Christoph Hellwig
2017-11-08 10:06 ` [PATCH v2 2/3] nvme-rdma: don't complete requests before a send work request has completed Sagi Grimberg
2017-11-09  9:21   ` Christoph Hellwig
2017-11-09 11:14     ` Sagi Grimberg
2017-11-20  8:31       ` Christoph Hellwig
2017-11-20  8:37         ` Sagi Grimberg
2017-11-20  8:41           ` Christoph Hellwig
2017-11-20  9:04             ` Sagi Grimberg
2017-11-20  9:28             ` Sagi Grimberg
2017-11-20 10:49               ` Christoph Hellwig
2017-11-20 11:12                 ` Sagi Grimberg
2017-11-20 11:16                   ` Christoph Hellwig [this message]
2017-11-08 10:06 ` [PATCH v2 3/3] nvme-rdma: wait for local invalidation before completing a request Sagi Grimberg
2017-11-09  9:39   ` Christoph Hellwig
2017-11-13 22:10 ` [PATCH v2 0/3] Fix request completion holes Doug Ledford
2017-11-16 15:39   ` Sagi Grimberg
2017-11-16 15:58     ` Doug Ledford
2017-11-20  7:37     ` Christoph Hellwig
2017-11-20  8:33       ` Sagi Grimberg

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=20171120111640.GA32043@lst.de \
    --to=hch@lst.de \
    /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