From: sashiko-bot@kernel.org
To: "Karan Tilak Kumar" <kartilak@cisco.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH v6 04/13] scsi: fnic: Advertise NVMe initiator service parameters
Date: Fri, 24 Jul 2026 18:05:54 +0000 [thread overview]
Message-ID: <20260724180554.C2E3D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260724174811.5118-5-kartilak@cisco.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The commit sets `iport->service_params` to advertise NVMe initiator service parameters, but this field is never read. The actual PRLI frame is hardcoded to advertise FCP capabilities instead.
--
--- Patch [4]: [PATCH v6 04/13] scsi: fnic: Advertise NVMe initiator service parameters ---
commit ed8174a20b4f25dad8815dfbe2e3def2feb4906c
Author: Karan Tilak Kumar <kartilak@cisco.com>
scsi: fnic: Advertise NVMe initiator service parameters
This commit sets FC service parameters according to the selected initiator
role. It keeps FCP retry and confirmation bits for FCP initiators, and
advertises NVMe initiator and SLER bits for NVMe initiators.
> diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
> index 3a365ea455b1a..5850d51b0e8f6 100644
> --- a/drivers/scsi/fnic/fnic_main.c
> +++ b/drivers/scsi/fnic/fnic_main.c
> @@ -1016,11 +1016,16 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> iport->max_flogi_retries = fnic->config.flogi_retries;
> iport->max_plogi_retries = fnic->config.plogi_retries;
> iport->plogi_timeout = fnic->config.plogi_timeout;
> - iport->service_params =
> - (FNIC_FCP_SP_INITIATOR | FNIC_FCP_SP_RD_XRDY_DIS |
> - FNIC_FCP_SP_CONF_CMPL);
> - if (fnic->config.flags & VFCF_FCP_SEQ_LVL_ERR)
> - iport->service_params |= FNIC_FCP_SP_RETRY;
> + if (IS_FNIC_FCP_INITIATOR(fnic)) {
> + iport->service_params = (FNIC_FCP_SP_INITIATOR |
> + FNIC_FCP_SP_RD_XRDY_DIS | FNIC_FCP_SP_CONF_CMPL);
> + if (fnic->config.flags & VFCF_FCP_SEQ_LVL_ERR)
> + iport->service_params |= FNIC_FCP_SP_RETRY;
> + } else if (IS_FNIC_NVME_INITIATOR(fnic)) {
> + iport->service_params = (FNIC_NVME_SP_INITIATOR);
> + if (fnic->config.flags & VFCF_FCP_SEQ_LVL_ERR)
> + iport->service_params |= FNIC_NVME_SP_SLER;
> + }
[Severity: High]
Is iport->service_params actually used when sending the PRLI request?
Looking at fdls_send_tgt_prli() in drivers/scsi/fnic/fdls_disc.c, it appears
the PRLI payload hardcodes the FCP parameters directly:
.sp = {.spp_type = 0x08, .spp_flags = 0x0020,
.spp_params = cpu_to_be32(0xA2)}
If the service_params field is ignored, will the NVMe initiator feature fall
back to advertising FCP capabilities (type 0x08) instead of NVMe, preventing
successful discovery and login for NVMe targets?
>
> iport->boot_time = jiffies;
> iport->e_d_tov = fnic->config.ed_tov;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260724174811.5118-1-kartilak@cisco.com?part=4
next prev parent reply other threads:[~2026-07-24 18:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 17:47 [PATCH v6 00/13] Introduce functionality for NVMe initiator Karan Tilak Kumar
2026-07-24 17:47 ` [PATCH v6 01/13] scsi: fnic: Make debug logging protocol independent Karan Tilak Kumar
2026-07-24 18:16 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 02/13] scsi: fnic: Use fnic_num for non-SCSI identifiers Karan Tilak Kumar
2026-07-24 18:09 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 03/13] scsi: fnic: Decode firmware role configuration Karan Tilak Kumar
2026-07-24 18:07 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 04/13] scsi: fnic: Advertise NVMe initiator service parameters Karan Tilak Kumar
2026-07-24 18:05 ` sashiko-bot [this message]
2026-07-24 17:48 ` [PATCH v6 05/13] scsi: fnic: Add FDLS role handling for NVMe initiators Karan Tilak Kumar
2026-07-24 18:54 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 06/13] scsi: fnic: Add the NVMe/FC transport path Karan Tilak Kumar
2026-07-24 18:20 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 07/13] scsi: fnic: Route completions and resets by initiator role Karan Tilak Kumar
2026-07-24 18:26 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 08/13] scsi: fnic: Handle NVMe LS frames in FDLS Karan Tilak Kumar
2026-07-24 18:17 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 09/13] scsi: fnic: Send NVMe LS requests through FDLS Karan Tilak Kumar
2026-07-24 18:16 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 10/13] scsi: fnic: Abort timed-out NVMe LS requests Karan Tilak Kumar
2026-07-24 18:26 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 11/13] scsi: fnic: Track NVMe transport statistics Karan Tilak Kumar
2026-07-24 18:31 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 12/13] scsi: fnic: Expose NVMe transport state in debugfs Karan Tilak Kumar
2026-07-24 18:25 ` sashiko-bot
2026-07-24 17:48 ` [PATCH v6 13/13] scsi: fnic: Bump up version number Karan Tilak Kumar
2026-07-24 18:18 ` sashiko-bot
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=20260724180554.C2E3D1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kartilak@cisco.com \
--cc=linux-scsi@vger.kernel.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