Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mohamed Khalfella <mkhalfella@purestorage.com>
To: sashiko-reviews@lists.linux.dev
Cc: linux-nvme@lists.infradead.org
Subject: Re: [PATCH v7 01/17] nvmet: Rapid Path Failure Recovery set controller identify fields
Date: Mon, 16 Nov 2026 15:17:03 -0800	[thread overview]
Message-ID: <20261116231703.GA1670230-mkhalfella@purestorage.com> (raw)
In-Reply-To: <sashiko-outbox-214092@kernel.org>

On Sat 2026-11-14 03:17:21 +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] nvmet: missing TP8028 field overrides in
>   nvmet_passthru_override_id_ctrl()
> --
> 
> commit b07e2fdf2211131fb02142faf21d5cf7328792da
> Author: Mohamed Khalfella <mkhalfella@purestorage.com>
> 
> nvmet: Rapid Path Failure Recovery set controller identify fields
> 
> This commit adds the TP8028 Rapid Path Failure Recovery fields (ciu, cirn,
> and ccrl) to struct nvme_id_ctrl, initializes ciu and cirn on controller
> allocation and start, and populates them in the Identify Controller
> response for non-discovery subsystems.
> 
> > diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
> > index f12d830986446..5710ae53eb83a 100644
> > --- a/drivers/nvme/target/admin-cmd.c
> > +++ b/drivers/nvme/target/admin-cmd.c
> > @@ -702,6 +702,11 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
> >  	id->mdts = nvmet_ctrl_mdts(req);
> >  	id->cntlid = cpu_to_le16(ctrl->cntlid);
> >  	id->ver = cpu_to_le32(ctrl->subsys->ver);
> > +	if (!nvmet_is_disc_subsys(ctrl->subsys)) {
> > +		id->ciu = ctrl->ciu;
> > +		id->cirn = cpu_to_le64(ctrl->cirn);
> > +		id->ccrl = NVMF_CCR_LIMIT;
> > +	}
> 
> [Severity: Medium]
> Should nvmet_passthru_override_id_ctrl() also override id->ciu, id->cirn,
> and id->ccrl?
> 
> On a passthrough subsystem, Identify Controller runs through
> nvmet_passthru_execute_cmd_work() -> nvmet_passthru_override_id_ctrl(),
> which overrides id->cntlid and id->ver but leaves id->ciu, id->cirn, and
> id->ccrl with whatever the backend controller returned.  Every fabric
> controller connected to the passthrough subsystem will report the backend
> device's ciu and cirn instead of ctrl->ciu and ctrl->cirn, and if the
> backend controller advertises a non-zero ccrl, hosts will issue
> Cross-Controller Reset commands that nvmet_parse_passthru_admin_cmd()
> rejects.

Makes sense. Will update nvmet_passthru_override_id_ctrl() to set
id->ciu, id->cirn, id->ccrl, and id->cqt to zero. This way a passthu
controller exprted say over nvmet-tcp does not claim to support CCR/CQT.

I will break the change into fixups to two commits
- nvmet: Rapid Path Failure Recovery set controller identify fields
- nvmet: Add support for CQT to nvme target

> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/20261114030454.2836543-1-mkhalfella@purestorage.com?part=1


  reply	other threads:[~2026-11-16 23:17 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14  3:04 [PATCH v7 00/17] TP8028 Rapid Path Failure Recovery Mohamed Khalfella
2026-11-14  3:04 ` [PATCH v7 01/17] nvmet: Rapid Path Failure Recovery set controller identify fields Mohamed Khalfella
2026-11-14  3:17   ` sashiko-bot
2026-11-16 23:17     ` Mohamed Khalfella [this message]
2026-11-14  3:04 ` [PATCH v7 02/17] nvmet/debugfs: Export controller CIU and CIRN via debugfs Mohamed Khalfella
2026-11-14  3:12   ` sashiko-bot
2026-11-16 23:19     ` Mohamed Khalfella
2026-11-14  3:04 ` [PATCH v7 03/17] nvmet: Implement CCR nvme command Mohamed Khalfella
2026-11-14  3:30   ` sashiko-bot
2026-11-16 23:54     ` Mohamed Khalfella
2026-11-16  8:45   ` Dmitry Bogdanov
2026-11-17  0:03     ` Mohamed Khalfella
2026-11-17  7:09       ` Hannes Reinecke
2026-11-17  9:38       ` Dmitry Bogdanov
2026-11-14  3:04 ` [PATCH v7 04/17] nvmet: Implement CCR logpage Mohamed Khalfella
2026-11-14  3:20   ` sashiko-bot
2026-11-17  0:16     ` Mohamed Khalfella
2026-11-14  3:04 ` [PATCH v7 05/17] nvmet: Send an AEN on CCR completion Mohamed Khalfella
2026-11-14  3:04 ` [PATCH v7 06/17] nvme: Rapid Path Failure Recovery read controller identify fields Mohamed Khalfella
2026-11-14  3:04 ` [PATCH v7 07/17] nvme: Introduce FENCING and FENCED controller states Mohamed Khalfella
2026-11-14  3:29   ` sashiko-bot
2026-11-16  7:16   ` Hannes Reinecke
2026-11-14  3:04 ` [PATCH v7 08/17] nvme: Implement cross-controller reset recovery Mohamed Khalfella
2026-11-14  3:26   ` sashiko-bot
2026-11-14  3:04 ` [PATCH v7 09/17] nvme: Implement cross-controller reset completion Mohamed Khalfella
2026-11-14  3:29   ` sashiko-bot
2026-11-16  7:17   ` Hannes Reinecke
2026-11-14  3:04 ` [PATCH v7 10/17] nvme-tcp: Use CCR to recover controller that hits an error Mohamed Khalfella
2026-11-14  3:38   ` sashiko-bot
2026-11-14  3:04 ` [PATCH v7 11/17] nvme-rdma: " Mohamed Khalfella
2026-11-16  7:19   ` Hannes Reinecke
2026-11-14  3:04 ` [PATCH v7 12/17] nvme-fc: start error recovery instead of aborting timed out IOs Mohamed Khalfella
2026-11-14  3:46   ` sashiko-bot
2026-11-16  7:31   ` Hannes Reinecke
2026-11-14  3:04 ` [PATCH v7 13/17] nvme-fc: perform error recovery directly from ioerr_work Mohamed Khalfella
2026-11-14  3:31   ` sashiko-bot
2026-11-16  7:37   ` Hannes Reinecke
2026-11-14  3:04 ` [PATCH v7 14/17] nvme-fc: Use CCR to recover controller that hits an error Mohamed Khalfella
2026-11-14  3:38   ` sashiko-bot
2026-11-16  7:38   ` Hannes Reinecke
2026-11-14  3:04 ` [PATCH v7 15/17] nvme-fc: Hold inflight requests while in FENCING state Mohamed Khalfella
2026-11-14  4:06   ` sashiko-bot
2026-11-16  7:52   ` Hannes Reinecke
2026-11-14  3:04 ` [PATCH v7 16/17] nvmet: Add support for CQT to nvme target Mohamed Khalfella
2026-11-14  3:04 ` [PATCH v7 17/17] nvme: Add support for CQT to nvme host Mohamed Khalfella
2026-11-16  7:55   ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261116231703.GA1670230-mkhalfella@purestorage.com \
    --to=mkhalfella@purestorage.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox