nvme-fabrics: short-circuit reconnect retries
authorHannes Reinecke <hare@suse.de>
Tue, 30 Apr 2024 13:19:27 +0000 (15:19 +0200)
committerKeith Busch <kbusch@kernel.org>
Wed, 1 May 2024 10:07:20 +0000 (03:07 -0700)
commitadfde7ed0b301ef14c37efe3143a8b26849843f6
treefd7a2de3ccd1e1514cfba3c6a6ef7b88b372ac82
parent44350336fd9dab7a337dec686978a160cf1abfc5
nvme-fabrics: short-circuit reconnect retries

Returning a 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>
[dwagner: - extended nvme_should_reconnect]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/fabrics.c
drivers/nvme/host/fabrics.h
drivers/nvme/host/fc.c
drivers/nvme/host/rdma.c
drivers/nvme/host/tcp.c