Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp969621rdb; Fri, 16 Feb 2024 00:49:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUXROtsJl6JjWCYg0Xn0wblDidiSub9dKZljp+4xYuhUvGsjv7zhI5SN8Pj1CrLkoKYvvnBTPtvH24uK6LVLg+yO3mYGRIlBQUtCLAKVQ== X-Google-Smtp-Source: AGHT+IF0SmPnTH3+us5DwrGNDcgre3m7+4uUu01e92Gn6r4Z2gKnFONd4S2Q7HD5Z1gYRrRNFsew X-Received: by 2002:a05:6808:1986:b0:3c1:3730:774 with SMTP id bj6-20020a056808198600b003c137300774mr4676917oib.20.1708073390285; Fri, 16 Feb 2024 00:49:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708073390; cv=pass; d=google.com; s=arc-20160816; b=cUuLFg7tCt2w4ydfne0lcYNxdfn8KWPEeRjUJyJudbJth/fDx4wFirbmXIape3dTRw X7LzuMRdjk08W4prwVk+d1Jolugbx7F1Sf6UNs6aWpaC/ZW/5GA72OvkBuogGRN1moH3 xduKZthIYVCU74zrDsYnk+KojAVorW1Lyh2lRMhxFyoybh78KzPTiUwIqUk2YykOshtf KMFjGZBycGyc1TXzkNj06L+N8zouoWaVr+oQnWx4Xx+o/6JNVWyYUJdCz9Fq2hYdkG5Q HTfDlwVCEsi9c23JzbQuMu6S/qUpJiMjd2fb1RohrTij8Xn6H3KIWNOKs0HoJXo1zTsD I59w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=1vZAwwN5v7M2QsLQcS5Sny5saf5uh8b6XoVupT450oA=; fh=RymfTjZCcjoLZ4QyuoC8uFkgj4QNYM/VblY/3wFaCcc=; b=TpakNGpnOdTDU/wvUrtWx1FsN0//cntOAWvbFSkqmt/GbLdcUq9Qc5DMT0wtGMopOr QCsF1sGTU77D8O9t/p6no2PuxWOiXkmHpiRc/KU8B3dho6+MZ1ESWDOuUEV8dF6Fzj01 DcVngBpmvuI5b1OwPmVxCDVfk3/t2Yp/LN+rcgzt7P0CGoMzwHkOomkGqf1jh+ap8o/8 dBQ7elkfVFeIIJ6/JLO+A9qFCl8uCOziVHtOz3bU8Ocojh/8b0SmYOzQyyXbFutGRZoS i7zpcOz2Kl1Elk+WHGZbMVxPTpbzgNKmZPZhS2vzIIVQG3vssVUIbVe+pGVdISfqIULg 0awQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="oGmZ/pgL"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="oGmZ/pgL"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-68263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b22-20020a656696000000b005d8e1ec7226si2572945pgw.552.2024.02.16.00.49.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 00:49:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="oGmZ/pgL"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="oGmZ/pgL"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-68263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A3148B213A2 for ; Fri, 16 Feb 2024 08:49:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C5441D54F; Fri, 16 Feb 2024 08:45:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="oGmZ/pgL"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="PlBPCkFL"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="oGmZ/pgL"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="PlBPCkFL" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C9771B95B for ; Fri, 16 Feb 2024 08:45:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708073146; cv=none; b=Szh9dH5sn9hL5qfga4hoFPZPMO+qNxgc2OCwIzjLQ59Uwd13JbVpKeZQcuXf2hkr/SbNsms6RBVARyF42UaHG69SNIeUcpb3kiVEDXOnqtsYSGdNQC/m2jlG7/WtJZEptLPzl6gvSbAgi5j51u9WrRoIGloBDlCt5U9hIXJ4uCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708073146; c=relaxed/simple; bh=AmBehZ5DjuPHaP/AQs1fixAgjbcdEg6oKvv5GCgMlqc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p+BvaA7TrG6Ve21BTfVUXWtlExBIqTO0mWZiP5YCgOreWI29n0r6SsYxBwOxOWKhg3oIe0UlqPHUATWoUS/jTbJGJE3vmGyqQuvJ6WIo569Tf4m5iM0KESp3BA8OV8+Y/K+3Htpb9JjwjxJ4hUHZ8gMzm8R3ePJXmArsu4u9tC8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=oGmZ/pgL; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=PlBPCkFL; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=oGmZ/pgL; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=PlBPCkFL; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id ABAB2220C9; Fri, 16 Feb 2024 08:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708073140; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1vZAwwN5v7M2QsLQcS5Sny5saf5uh8b6XoVupT450oA=; b=oGmZ/pgLPXXIqg5PJg5IICrS7lcXzZPrhgF5ZZaDAzecPsx3bHJimDJRZgkz14T4Z+YjjO qefg6v+g+wi72ALfCB+zcdcmMWgO7hYw85jR5iE/8FSlL044yNAzLRoyK+SJnOFVmu6hXS TEO9P5XgQeR/9NAnSRYHfg7sDuT4jq8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708073140; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1vZAwwN5v7M2QsLQcS5Sny5saf5uh8b6XoVupT450oA=; b=PlBPCkFLZgBA+CGTDdAI4ZNYR2Nb2hvshPJQpjW0R+WpsDX9WSBTKtpt+EhlSxjHrq8eIv NMjX1osvgsJT0SDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708073140; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1vZAwwN5v7M2QsLQcS5Sny5saf5uh8b6XoVupT450oA=; b=oGmZ/pgLPXXIqg5PJg5IICrS7lcXzZPrhgF5ZZaDAzecPsx3bHJimDJRZgkz14T4Z+YjjO qefg6v+g+wi72ALfCB+zcdcmMWgO7hYw85jR5iE/8FSlL044yNAzLRoyK+SJnOFVmu6hXS TEO9P5XgQeR/9NAnSRYHfg7sDuT4jq8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708073140; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1vZAwwN5v7M2QsLQcS5Sny5saf5uh8b6XoVupT450oA=; b=PlBPCkFLZgBA+CGTDdAI4ZNYR2Nb2hvshPJQpjW0R+WpsDX9WSBTKtpt+EhlSxjHrq8eIv NMjX1osvgsJT0SDQ== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 999BB13343; Fri, 16 Feb 2024 08:45:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id fGwHJLQgz2WccwAAn2gu4w (envelope-from ); Fri, 16 Feb 2024 08:45:40 +0000 From: Daniel Wagner To: James Smart Cc: Keith Busch , Christoph Hellwig , Sagi Grimberg , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Wagner Subject: [PATCH v0 3/6] nvme-fc: do not retry when auth fails or connection is refused Date: Fri, 16 Feb 2024 09:45:23 +0100 Message-ID: <20240216084526.14133-4-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240216084526.14133-1-dwagner@suse.de> References: <20240216084526.14133-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [4.45 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.45)[78.89%] X-Spam-Level: **** X-Spam-Score: 4.45 X-Spam-Flag: NO The is no point in retrying to connect if the authentication fails. Connection refused is also issued from the authentication path, thus also do not retry. Signed-off-by: Daniel Wagner --- drivers/nvme/host/fc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index a5b29e9ad342..b81046c9f171 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -3312,6 +3312,8 @@ nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status) ctrl->cnum, status); if (status > 0 && (status & NVME_SC_DNR)) recon = false; + if (status == NVME_SC_AUTH_REQUIRED || status == -ECONNREFUSED) + recon = false; } else if (time_after_eq(jiffies, rport->dev_loss_end)) recon = false; -- 2.43.0