From mboxrd@z Thu Jan 1 00:00:00 1970 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 857A13191CE for ; Wed, 18 Feb 2026 08:26:34 +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=1771403195; cv=none; b=YA/GLp95lTjDvR3qcDPghPcrCGRzePF3z7bU9EyxVbCtRUPg7MOfC2ZI/G1khjyAElDBB4ZfxprhoeicZ3lxsEzWeuJTu0Y8RJbmCCCq/hqJZgPs8Yd7bmhW2MiFHRyXu9uicphzkADa76W5/XANdQ9+4FK5s4DY34OiDt19Zb4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771403195; c=relaxed/simple; bh=adhJ1pFBhga3eEr7NprfM0sQpRLJx8jCZPc/6MbKcds=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=J62ru4LzisfSpvqpVn47Ny7iEUdtsO7UM/dloJMJypYi6lxsWWwW96/zpPQqD6XMRr/6PX+YcSCr6rpf5jVw29twMxRum/SIgxSnSWyscvGjm0e3tTKk4YZW7XCGBwvieJlLpy+Vcos7J251U227elMQ+lY456pJh5LSh0hWRK4= 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=Ord3GcoO; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=7f5SR+E7; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Ord3GcoO; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=7f5SR+E7; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Ord3GcoO"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="7f5SR+E7"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Ord3GcoO"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="7f5SR+E7" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (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 BAB923E6E8; Wed, 18 Feb 2026 08:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1771403192; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uG1W71yVzpq8R4o3XHp5q+zB8HyQY7YKXS4bzpupA+Y=; b=Ord3GcoOV8sHvUT64cepL06gXspm4MbMLYovdbLnjMCvjiK7WpdUx31If1Ab6x+R8LzGAW 0FTNGqz99z5r8Cr3zNTDTMkBaXBX6mo8JKHVJuy46OA1Q9zHL50I9vUNEmUabUYVrPs4zY COB0oNLADQEMUA0DLwe148pDMeNPNZc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1771403192; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uG1W71yVzpq8R4o3XHp5q+zB8HyQY7YKXS4bzpupA+Y=; b=7f5SR+E7fE3Hj90o+RejnLbj+fBliykmxs3yHOxey6tncy7Pe06dadE4iZQB8acPU3Qsns Sm1y/Pgx7/P/k0BA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Ord3GcoO; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=7f5SR+E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1771403192; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uG1W71yVzpq8R4o3XHp5q+zB8HyQY7YKXS4bzpupA+Y=; b=Ord3GcoOV8sHvUT64cepL06gXspm4MbMLYovdbLnjMCvjiK7WpdUx31If1Ab6x+R8LzGAW 0FTNGqz99z5r8Cr3zNTDTMkBaXBX6mo8JKHVJuy46OA1Q9zHL50I9vUNEmUabUYVrPs4zY COB0oNLADQEMUA0DLwe148pDMeNPNZc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1771403192; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uG1W71yVzpq8R4o3XHp5q+zB8HyQY7YKXS4bzpupA+Y=; b=7f5SR+E7fE3Hj90o+RejnLbj+fBliykmxs3yHOxey6tncy7Pe06dadE4iZQB8acPU3Qsns Sm1y/Pgx7/P/k0BA== Received: from imap1.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 imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 528A83EA65; Wed, 18 Feb 2026 08:26:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 4Dw1Erh3lWnGIgAAD6G6ig (envelope-from ); Wed, 18 Feb 2026 08:26:32 +0000 Message-ID: <47a898f3-bc2d-4385-b9c0-125daff7cf27@suse.de> Date: Wed, 18 Feb 2026 09:26:31 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 19/21] nvme-tcp: Extend FENCING state per TP4129 on CCR failure To: Mohamed Khalfella Cc: Justin Tee , Naresh Gottumukkala , Paul Ely , Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , James Smart , Aaron Dailey , Randy Jennings , Dhaval Giani , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260214042753.4073668-1-mkhalfella@purestorage.com> <20260214042753.4073668-20-mkhalfella@purestorage.com> <7fcdb6bb-34b4-4b73-afce-75c423f8400b@suse.de> <20260217175848.GD3435530-mkhalfella@purestorage.com> Content-Language: en-US From: Hannes Reinecke In-Reply-To: <20260217175848.GD3435530-mkhalfella@purestorage.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWELVE(0.00)[15]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[broadcom.com,gmail.com,nvidia.com,lst.de,kernel.dk,kernel.org,grimberg.me,purestorage.com,lists.infradead.org,vger.kernel.org]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email]; URIBL_BLOCKED(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:dkim,suse.de:mid,suse.de:email,purestorage.com:email]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Queue-Id: BAB923E6E8 X-Spam-Flag: NO X-Spam-Score: -4.51 X-Spam-Level: On 2/17/26 18:58, Mohamed Khalfella wrote: > On Mon 2026-02-16 13:56:10 +0100, Hannes Reinecke wrote: >> On 2/14/26 05:25, Mohamed Khalfella wrote: >>> If CCR operations fail and CQT is supported, we must defer the retry of >>> inflight requests per TP4129. Update ctrl->fencing_work to schedule >>> ctrl->fenced_work, effectively extending the FENCING state. This delay >>> ensures that inflight requests are held until it is safe for them to be >>> retired. >>> >>> Signed-off-by: Mohamed Khalfella >>> --- >>> drivers/nvme/host/tcp.c | 39 +++++++++++++++++++++++++++++++++++---- >>> 1 file changed, 35 insertions(+), 4 deletions(-) >>> >> Can't you merge / integrate this into the nvme_fence_ctrl() routine? > > ctrl->fencing_work and ctrl->fenced_work are in transport specific > controller, struct nvme_tcp_ctrl in this case. There is no easy way to > access these members from nvme_fence_ctrl(). One option to go around > that is to move them into struct nvme_ctrl. But we call error recovery > after a controller is fenced, and error recovery is implemented in > transport specific way. That is why the delay is implemented/repeated > for every transport. > >> The previous patch already extended the timeout to cover for CQT, so >> we can just wait for the timeout if CCR failed, no? > > Following on the point above. One change can be done is to reset the > controller after fencing finishes instead of using error recovery. > This way everything lives in core.c. But I have not tested that. > > Do you think this is better than what has been implemented now? > Yeah, the eternal problem. At one point someone will have to explain to my why 'reset' and 'error handling' are two _distinct_ code paths in nvme-tcp. I really don't get that. I _guess_ it's trying to hold requests when doing a reset, and aborting requests if it's an error. But why one needs to make that distinction is a mystery to me; FC combines both paths and seems to work quite happily. Thing is, that will get in the way when trying to move fencing into the generic layer; you only can call 'nvme_reset_ctrl()', and hope that this one will abort commands. I'll check. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich