]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nvme-fabrics: add ENOKEY to no retry criteria for authentication failures
authorJustin Tee <justintee8345@gmail.com>
Mon, 17 Nov 2025 18:43:43 +0000 (10:43 -0800)
committerKeith Busch <kbusch@kernel.org>
Thu, 4 Dec 2025 22:46:17 +0000 (14:46 -0800)
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>
Tested-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/fabrics.c

index 2e58a7ce109052ecdda433f13162911459a81fb3..55a8afd2efd50306a9fb90945ab7308954f397d0 100644 (file)
@@ -592,7 +592,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 ||