public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/1] nvme-fabrics: add ENOKEY to no retry criteria for authentication failures
@ 2025-11-17 18:43 Justin Tee
  2025-11-18  7:01 ` Hannes Reinecke
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Justin Tee @ 2025-11-17 18:43 UTC (permalink / raw)
  To: linux-nvme, linux-kernel
  Cc: jsmart2021, justin.tee, Justin Tee, Daniel Wagner,
	Hannes Reinecke

With authentication, in addition to EKEYREJECTED there is also no point in
retrying reconnects when status is ENOKEY.  Thus, add -ENOKEY as another
criteria to determine when to stop retries.

Cc: Daniel Wagner <wagi@kernel.org>
Cc: Hannes Reinecke <hare@suse.de>
Closes: https://lore.kernel.org/linux-nvme/20250829-nvme-fc-sync-v3-0-d69c87e63aee@kernel.org/
Signed-off-by: Justin Tee <justintee8345@gmail.com>
---
 drivers/nvme/host/fabrics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 3d4d6d8e88c4..fb7765bf0cdf 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -594,7 +594,7 @@ bool nvmf_should_reconnect(struct nvme_ctrl *ctrl, int status)
 	if (status > 0 && (status & NVME_STATUS_DNR))
 		return false;
 
-	if (status == -EKEYREJECTED)
+	if (status == -EKEYREJECTED || status == -ENOKEY)
 		return false;
 
 	if (ctrl->opts->max_reconnects == -1 ||
-- 
2.38.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-30 23:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17 18:43 [PATCH 1/1] nvme-fabrics: add ENOKEY to no retry criteria for authentication failures Justin Tee
2025-11-18  7:01 ` Hannes Reinecke
2025-11-24 10:26   ` Daniel Wagner
2025-11-25  0:57     ` Justin Tee
2025-11-25 10:34       ` Daniel Wagner
2025-11-26  8:12         ` Daniel Wagner
2025-11-24 19:36 ` Keith Busch
2025-11-30 23:05 ` Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox