Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Daniel Wagner <dwagner@suse.de>, James Smart <james.smart@broadcom.com>
Cc: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>, Hannes Reinecke <hare@suse.de>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] nvme-tcp: short-circuit reconnect retries
Date: Wed, 6 Mar 2024 08:10:06 +0000	[thread overview]
Message-ID: <6ad59e60-0c0e-4164-8960-a0e8dbd60152@nvidia.com> (raw)
In-Reply-To: <20240305080005.3638-2-dwagner@suse.de>

On 3/5/24 00:00, Daniel Wagner wrote:
> From: Hannes Reinecke <hare@suse.de>
>
> Returning an nvme status from nvme_tcp_setup_ctrl() indicates
> that the association was established and we have received a status
> from the controller; consequently we should honour the DNR bit.
> If not any future reconnect attempts will just return the same error, so
> we can short-circuit the reconnect attempts and fail the connection
> directly.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>   drivers/nvme/host/tcp.c | 23 +++++++++++++++--------
>   1 file changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> index 3b20c5ed033f..f9ad5904ed62 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -2149,9 +2149,11 @@ static void nvme_tcp_teardown_io_queues(struct nvme_ctrl *ctrl,
>   	nvme_tcp_destroy_io_queues(ctrl, remove);
>   }
>   
> -static void nvme_tcp_reconnect_or_remove(struct nvme_ctrl *ctrl)
> +static void nvme_tcp_reconnect_or_remove(struct nvme_ctrl *ctrl,
> +		int status)
>   {
>   	enum nvme_ctrl_state state = nvme_ctrl_state(ctrl);
> +	bool recon = status > 0 && (status & NVME_SC_DNR) ? false : true;
>   

hmmm bunch of nvme command calls may have DNR set ...

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck



  reply	other threads:[~2024-03-06  8:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  8:00 [PATCH v3 0/2] nvme-fabrics: short-circuit connect retries Daniel Wagner
2024-03-05  8:00 ` [PATCH v3 1/2] nvme-tcp: short-circuit reconnect retries Daniel Wagner
2024-03-06  8:10   ` Chaitanya Kulkarni [this message]
2024-03-05  8:00 ` [PATCH v3 2/2] nvme-rdma: " Daniel Wagner
2024-03-06  8:11   ` Chaitanya Kulkarni
2024-03-06  8:17     ` Chaitanya Kulkarni
2024-03-07  8:00 ` [PATCH v3 0/2] nvme-fabrics: short-circuit connect retries Sagi Grimberg
2024-03-07 10:37   ` Hannes Reinecke
2024-03-07 11:30     ` Sagi Grimberg
2024-03-07 11:45       ` Hannes Reinecke
2024-03-07 12:14         ` Sagi Grimberg
2024-03-07 12:52           ` Hannes Reinecke
2024-03-08 10:21             ` 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=6ad59e60-0c0e-4164-8960-a0e8dbd60152@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=dwagner@suse.de \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.smart@broadcom.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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