Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/7] nvme-fc: FPIN link integrity handling
@ 2026-09-02 20:05 Jesse Taube
  2026-09-02 20:05 ` [PATCH v2 1/7] nvme: add NVME_CTRL_MARGINAL flag Jesse Taube
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Jesse Taube @ 2026-09-02 20:05 UTC (permalink / raw)
  To: linux-nvme
  Cc: linux-scsi, Jonathan Corbet, Shuah Khan, Keith Busch, Jens Axboe,
	Christoph Hellwig, Sagi Grimberg, Justin Tee, Naresh Gottumukkala,
	Paul Ely, Chaitanya Kulkarni, James E.J. Bottomley,
	Martin K. Petersen, Nilesh Javali, GR-QLogic-Storage-Upstream,
	Hannes Reinecke, Jesse Taube, Gustavo A. R. Silva, John Meneghini,
	Bryan Gurney, Chris Leech, Ewan D . Milne, shinichiro.kawasaki,
	linux-doc, linux-kernel, linux-block

This set has been split into an NVMe set which adds marginal path
handling and a SCSI set which handles decoding FPIN LI events and
setting the marginal flag. The NVMe set, this one, can be tested and
used independently of the SCSI set.

FPIN LI (link integrity) messages are received when the attached fabric
detects hardware errors. In response, I/O should be directed away from
the affected ports. This series adds a new controller flag
'NVME_CTRL_MARGINAL' which is checked during multipath path selection,
causing the path to be de-prioritized. If no other paths are available
the marginal paths are still used.

Testing was performed by Jesse Taube and John Meneghini using blktests
with the fcloop driver.

Controllers on the affected port show the NVME_CTRL_MARGINAL flag:

   \
    +- nvme4 fc traddr=c,host_traddr=e live optimized
    +- nvme5 fc traddr=8,host_traddr=e live non-optimized
    +- nvme8 fc traddr=e,host_traddr=f marginal optimized
    +- nvme9 fc traddr=a,host_traddr=f marginal non-optimized

All multipath io-policies were verified: numa, round-robin, and
queue-depth. Scenarios included optimized, non-optimized, and
inaccessible, and marginal paths. When all paths are
marginal, I/O continues based on the multipath policy.

Original work on this set was presented at the LSFMM 2024 conference:
Link: https://people.redhat.com/jmeneghi/LSFMM_2024/LSFMM_2024_NVMe_Cancel_and_FPIN.pdf

To test path handling use:
https://github.com/linux-blktests/blktests/pull/264
or
https://lore.kernel.org/linux-nvme/20260828153029.853768-1-jtaubepe@redhat.com/T/

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220329

Previously posted as a combined NVMe+SCSI series (v1-v11).

V1 -> V2:
- Changed flag name to 'marginal'
- Do not block marginal path; influence path selection instead
  to de-prioritize marginal paths

V2 -> V3:
- Split off driver-specific modifications
- Introduce 'union fc_tlv_desc' to avoid casts

V3 -> V4:
- Include reviews from Justin Tee
- Split marginal path handling patch

V4 -> V5:
- Change 'u8' to '__u8' on fc_tlv_desc to fix a failure to build
- Print 'marginal' instead of 'live' in the state of controllers
  when they are marginal

V5 -> V6:
- Minor spelling corrections to patch descriptions

V6 -> V7:
- No code changes; added note about additional testing

V7 -> V8:
- Split nvme core marginal flag addition into its own patch
- Add patch for queue_depth marginal path support

V8 -> V9:
- Rebased patch series to nvme-6.17.
- Added patch from Gustavo Silva, "scsi: qla2xxx: Fix memcpy field-spanning
  write issue", which resolves the field-spanning write issue
- We decided to leave the "marginal" state as is, because the transport
  driver uses the term "marginal".

V9 -> V10:
- Rebased patch series to nvme-6.18.
- Refactor and fix a patch from Gustavo Silva, "scsi: qla2xxx: Fix 2 memcpy
  field-spanning write issue", which resolves the field-spanning write
  issue.
  This new version of Gustavo's patch fixes a bug found in testing.
- Refactored original implementation
  New functions added:
    nvme_fc_lport_from_wwpn() - Find local port by WWPN
    nvme_fc_fpin_set_state() - Set marginal state on controllers
    nvme_fc_modify_rport_fpin_state() - Main API function
  Functions removed:
    nvme_fc_fpin_li_lport_update() - FPIN processing logic
    nvme_fc_fpin_rcv() - Direct FPIN message processing
  Functions modified:
    fc_rport_set_marginal_state - allows administrative control

V10 -> V1:
 - Rebase onto 7.2-rc1
 - Add marginal support to fcloop driver (new patch)
 - Rewrite multipath handling ("nvme-fc: marginal path handling") and
     ("nvme-multipath: queue-depth support for marginal paths") replacing
     them with ("nvme-multipath: round-robin...")
     ("nvme-fc: marginal path handling...") and
     ("nvme-multipath: queue-depth support")
 - New patch ("scsi: scsi_transport_fc: Add set_rport_marginal to ")
     replaces ("scsi: scsi_transport_fc: add fc_host_fpin_set_nvme").
     Uses existing function template to add a new callback for setting
     the marginal state on a remote port, similar to the existing
     set_rport_dev_loss_tmo() callback.
 - Replace `nvme_fc_modify_rport_fpin_state` with
     `nvme_fc_set_remoteport_fpin` which takes
     `struct nvme_fc_remote_port` instead of wwpn and wwnn
 - Rewrite the "enable FPIN notification for NVMe" patches
      to use the new callback methods.

V1 -> V2 (split):
 - Split SCSI and NVME parts.
 - Rewrite path handling code.

Bryan Gurney (2):
  nvme: add NVME_CTRL_MARGINAL flag
  nvme: sysfs: emit the marginal path state in show_state()

Jesse Taube (4):
  nvme-multipath: numa support for marginal paths
  nvme-multipath: round-robin support for marginal paths
  nvme-fc: add nvme_fc_set_remoteport_fpin()
  nvme: fcloop: Add set_marginal_rport to sysfs

John Meneghini (1):
  nvme-multipath: queue-depth support for marginal paths

 drivers/nvme/host/core.c       |  1 +
 drivers/nvme/host/fc.c         | 17 +++++++++
 drivers/nvme/host/multipath.c  | 70 ++++++++++++++++++++++++++++++----
 drivers/nvme/host/nvme.h       | 11 ++++++
 drivers/nvme/host/sysfs.c      |  3 ++
 drivers/nvme/target/fcloop.c   | 50 ++++++++++++++++++++++++
 include/linux/nvme-fc-driver.h |  2 +
 7 files changed, 146 insertions(+), 8 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-02 20:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 20:05 [PATCH v2 0/7] nvme-fc: FPIN link integrity handling Jesse Taube
2026-09-02 20:05 ` [PATCH v2 1/7] nvme: add NVME_CTRL_MARGINAL flag Jesse Taube
2026-09-02 20:05 ` [PATCH v2 2/7] nvme-multipath: numa support for marginal paths Jesse Taube
2026-09-02 20:05 ` [PATCH v2 3/7] nvme-multipath: queue-depth " Jesse Taube
2026-09-02 20:05 ` [PATCH v2 4/7] nvme-multipath: round-robin " Jesse Taube
2026-09-02 20:05 ` [PATCH v2 5/7] nvme: sysfs: emit the marginal path state in show_state() Jesse Taube
2026-09-02 20:05 ` [PATCH v2 6/7] nvme-fc: add nvme_fc_set_remoteport_fpin() Jesse Taube
2026-09-02 20:05 ` [PATCH v2 7/7] nvme: fcloop: Add set_marginal_rport to sysfs Jesse Taube

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox