From: Daniel Wagner <dwagner@suse.de>
To: 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-kernel@vger.kernel.org,
Daniel Wagner <dwagner@suse.de>
Subject: [PATCH v4 0/5] nvme-fabrics: short-circuit connect retries
Date: Thu, 4 Apr 2024 17:44:55 +0200 [thread overview]
Message-ID: <20240404154500.2101-1-dwagner@suse.de> (raw)
An rebase of Hannes two series which fix the TCP and RDMA transport to handle
the DNR bit on connect attempts.
For testing I extended the nvme/045 test case. I'll update the test case later
when the current batch of blktest changes are done. Also this change depends on
the extension of the debugfs interface of nvmet, which is also not yet merged.
echo "Renew host key on the controller and force reconnect"
new_hostkey="$(nvme gen-dhchap-key -n ${def_subsysnqn} 2> /dev/null)"
_set_nvmet_hostkey "${def_hostnqn}" "${new_hostkey}"
# Force a reconnect
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
cntlid="$(nvme id-ctrl "/dev/${nvmedev}" | grep cntlid | awk '{print $3}')"
echo "fatal" > /sys/kernel/debug/nvmet/"${def_subsysnqn}/ctrl$((${cntlid}))"/state
nvmf_wait_for_ctrl_delete "${nvmedev}"
baseline:
run 1 loop (nvmet_blkdev_type file)
nvme/045 (Test re-authentication) [passed]
runtime 2.690s ... 2.777s
run 1 tcp (nvmet_blkdev_type file)
nvme/045 (Test re-authentication) [failed]
runtime 2.777s ... 8.030s
--- tests/nvme/045.out 2024-04-04 16:14:22.547250311 +0200
+++ /home/wagi/work/blktests/results/nodev/nvme/045.out.bad 2024-04-04 17:29:03.427799336 +0200
@@ -9,5 +9,6 @@
Change hash to hmac(sha512)
Re-authenticate with changed hash
Renew host key on the controller and force reconnect
-disconnected 0 controller(s)
+controller "nvme2" not deleted within 5 seconds
+disconnected 1 controller(s)
Test complete
run 1 rdma (nvmet_blkdev_type file)
nvme/045 (Test re-authentication) [failed]
runtime 8.030s ... 9.632s
--- tests/nvme/045.out 2024-04-04 16:14:22.547250311 +0200
+++ /home/wagi/work/blktests/results/nodev/nvme/045.out.bad 2024-04-04 17:29:15.017745115 +0200
@@ -9,5 +9,6 @@
Change hash to hmac(sha512)
Re-authenticate with changed hash
Renew host key on the controller and force reconnect
-disconnected 0 controller(s)
+controller "nvme2" not deleted within 5 seconds
+disconnected 1 controller(s)
Test complete
run 1 fc (nvmet_blkdev_type file)
nvme/045 (Test re-authentication) [passed]
runtime 9.632s ... 3.588s
patched:
run 1 loop (nvmet_blkdev_type file)
nvme/045 (Test re-authentication) [passed]
runtime 6.816s ... 2.492s
run 1 tcp (nvmet_blkdev_type file)
nvme/045 (Test re-authentication) [passed]
runtime 2.492s ... 3.663s
run 1 rdma (nvmet_blkdev_type file)
nvme/045 (Test re-authentication) [passed]
runtime 3.663s ... 3.795s
run 1 fc (nvmet_blkdev_type file)
nvme/045 (Test re-authentication) [passed]
runtime 3.795s ... 2.690s
changes:
v4:
- rebased
- added 'nvme: fixes for authentication errors' series
https://lore.kernel.org/linux-nvme/20240301112823.132570-1-hare@kernel.org/
v3:
- added my SOB tag
- fixed indention
- https://lore.kernel.org/linux-nvme/20240305080005.3638-1-dwagner@suse.de/
v2:
- refresh/rebase on current head
- extended blktests (nvme/045) to cover this case
(see separate post)
- https://lore.kernel.org/linux-nvme/20240304161006.19328-1-dwagner@suse.de/
v1:
- initial version
- https://lore.kernel.org/linux-nvme/20210623143250.82445-1-hare@suse.de/
*** BLURB HERE ***
Hannes Reinecke (5):
nvme: authentication error are always non-retryable
nvmet: lock config semaphore when accessing DH-HMAC-CHAP key
nvmet: return DHCHAP status codes from nvmet_setup_auth()
nvme-tcp: short-circuit reconnect retries
nvme-rdma: short-circuit reconnect retries
drivers/nvme/host/core.c | 6 +++---
drivers/nvme/host/fabrics.c | 29 +++++++++++++++-----------
drivers/nvme/host/nvme.h | 19 ++++++++++++++++-
drivers/nvme/host/rdma.c | 22 ++++++++++++-------
drivers/nvme/host/tcp.c | 23 +++++++++++++-------
drivers/nvme/target/auth.c | 20 ++++++++----------
drivers/nvme/target/configfs.c | 22 ++++++++++++++-----
drivers/nvme/target/fabrics-cmd-auth.c | 11 +++++-----
8 files changed, 100 insertions(+), 52 deletions(-)
--
2.44.0
next reply other threads:[~2024-04-04 15:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 15:44 Daniel Wagner [this message]
2024-04-04 15:44 ` [PATCH v4 1/5] nvme: authentication error are always non-retryable Daniel Wagner
2024-04-05 6:16 ` Christoph Hellwig
2024-04-05 6:45 ` Daniel Wagner
2024-04-05 6:49 ` Christoph Hellwig
2024-04-04 15:44 ` [PATCH v4 2/5] nvmet: lock config semaphore when accessing DH-HMAC-CHAP key Daniel Wagner
2024-04-05 6:16 ` Christoph Hellwig
2024-04-04 15:44 ` [PATCH v4 3/5] nvmet: return DHCHAP status codes from nvmet_setup_auth() Daniel Wagner
2024-04-05 6:20 ` Christoph Hellwig
2024-04-05 10:02 ` Daniel Wagner
2024-04-05 13:24 ` Daniel Wagner
2024-04-05 14:47 ` Christoph Hellwig
2024-04-05 14:50 ` Christoph Hellwig
2024-04-04 15:44 ` [PATCH v4 4/5] nvme-tcp: short-circuit reconnect retries Daniel Wagner
2024-04-04 15:45 ` [PATCH v4 5/5] nvme-rdma: " Daniel Wagner
2024-04-04 15:50 ` [PATCH v4 0/5] nvme-fabrics: short-circuit connect retries Daniel Wagner
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=20240404154500.2101-1-dwagner@suse.de \
--to=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