Fpin v11i - #15
Open
johnmeneghini wants to merge 14 commits into
Open
Conversation
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
In qla_edif_bsg.h: `struct fc_bsg_reply` and `struct fc_bsg_request` have flexible array members, thus they must be the last member of the parent structure. Contininging in the effort to add `-Wflex-array-member-not-at-end`, move the structs to the end of the parent structures, `struct qla_bsg_auth_els_reply` and `struct qla_bsg_auth_els_request `. Suggested-by: John Meneghini <jmeneghi@redhat.com> Signed-off-by: Jesse Taube <jtaubepe@redhat.com>
Introduce 'union fc_tlv_desc' to have a common structure for all FC ELS TLV structures and avoid type casts. Fixes: 44b6169 ("scsi: fc: Avoid -Wflex-array-member-not-at-end warnings") Commit 44b6169 ("scsi: fc: Avoid -Wflex-array-member-not-at-end warnings") conflicts with this change. To solve the problem I moved the fc_els_rdf_hdr and fc_els_rdf_resp_hdr definitions out of fc_els.h and into lpfc_hw4.h. Cc: Gustavo A. R. Silva <gustavoars@kernel.org> Co-developed-by: John Meneghini <jmeneghi@redhat.com> Signed-off-by: John Meneghini <jmeneghi@redhat.com> Signed-off-by: Hannes Reinecke <hare@kernel.org> Tested-by: Bryan Gurney <bgurney@redhat.com>
Add a new controller flag, NVME_CTRL_MARGINAL, to help multipath I/O policies to react to a path that is set to a "marginal" state. The flag is cleared on controller reset, which is often the case when faulty cabling or transceiver hardware is replaced. Signed-off-by: Bryan Gurney <bgurney@redhat.com>
FPIN LI (link integrity) messages are received when the attached fabric detects hardware errors. In response to these messages I/O should be directed away from the affected ports, and only used if no other non-marginal paths are available. To handle this a new controller flag 'NVME_CTRL_MARGINAL' is added which will cause the multipath scheduler to skip these paths when checking for 'optimized' paths. This is a distinct change from the previous version which treated marginal paths as non-optimized but still usable. This changes the priority of marginal paths to be lower than non-optimized paths. Signed-off-by: Jesse Taube <jtaubepe@redhat.com> Reviewed-by: John Meneghini <jmeneghi@redhat.com>
Exclude marginal paths from queue-depth io policy. In the case where all paths are marginal and no optimized or non-optimized path is found, we fall back and select the best marginal path. Signed-off-by: Jesse Taube <jtaubepe@redhat.com> Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Exclude marginal paths from round-robin io policy. In the case where all paths are marginal and no optimized or non-optimized path is found, we fall back and perform round-robin on the marginal paths. Signed-off-by: Jesse Taube <jtaubepe@redhat.com>
If a controller has received a link integrity or congestion event, and has the NVME_CTRL_MARGINAL flag set, emit "marginal" in the state instead of "live", to identify the marginal paths. Co-developed-by: John Meneghini <jmeneghi@redhat.com> Signed-off-by: John Meneghini <jmeneghi@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Tested-by: Muneendra Kumar <muneendra.kumar@broadcom.com> Signed-off-by: Bryan Gurney <bgurney@redhat.com>
Add fc_fpin_set_marginal function to evaluate the FPIN LI TLV information and set the 'marginal' path status for all affected nvme rports. Then call set_rport_marginal() callback added to fc_function_template. The implementation of set_rport_marginal() is almost identical to set_rport_dev_loss_tmo implementation. Co-developed-by: Hannes Reinecke <hare@kernel.org> Signed-off-by: Hannes Reinecke <hare@kernel.org> Tested-by: Bryan Gurney <bgurney@redhat.com> Signed-off-by: John Meneghini <jmeneghi@redhat.com> --- why do we check rport->roles & FC_PORT_ROLE_NVME_TARGET but not in the sysfs commit
Refactor and fc_rport_set_marginal_state smp safe by holding
`shost->host_lock` around all `rport->port_state` accesses.
Call nvme_fc_modify_rport_fpin_state() when FC_PORTSTATE_MARGINAL is set
or cleared. This allows the user to quickly set or clear the
NVME_CTRL_MARGINAL state from sysfs.
E.g.:
echo "Marginal" > /sys/class/fc_remote_ports/rport-13:0-5/port_state
echo "Online" > /sys/class/fc_remote_ports/rport-13:0-5/port_state
Note: nvme_fc_modify_rport_fpin_state() will only affect rports that
have FC_PORT_ROLE_NVME_TARGET set.
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Add nvme_fc_set_remoteport_fpin() and supporting functions. This function is called by the SCSI FC transport and driver layer to set or clear the 'marginal' path status for a specific rport. Co-developed-by: Hannes Reinecke <hare@kernel.org> Signed-off-by: Hannes Reinecke <hare@kernel.org> Tested-by: Bryan Gurney <bgurney@redhat.com> Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Implement set_rport_marginal callback using nvme_fc_set_remoteport_fpin() to enable FPIN notifications for NVMe. Co-developed-by: Hannes Reinecke <hare@kernel.org> Signed-off-by: Hannes Reinecke <hare@kernel.org> Tested-by: Bryan Gurney <bgurney@redhat.com> Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Implement set_rport_marginal callback using nvme_fc_set_remoteport_fpin() to enable FPIN notifications for NVMe. Co-developed-by: Hannes Reinecke <hare@kernel.org> Signed-off-by: Hannes Reinecke <hare@kernel.org> Tested-by: Bryan Gurney <bgurney@redhat.com> Signed-off-by: John Meneghini <jmeneghi@redhat.com>
To allow testing of multipath failover, add a sysfs attribute to set a remote port as marginal. This will allow the fcloop LLDD to set the marginal flag on a remote port, simulating a marginal link. Example: Turn on marginal for a remote port matching wwnn and wwpn: `echo 'wwnn=0x200000109b5f2956,wwpn=0x100000109b5f2956,marginal=1' > /sys/class/fcloop/ctl/set_rport_marginal` Turn off marginal for a remote port matching wwnn and wwpn: `echo 'wwnn=0x200000109b5f2956,wwpn=0x100000109b5f2956,marginal=0' > /sys/class/fcloop/ctl/set_rport_marginal` Suggested-by: John Meneghini <jmeneghi@redhat.com> Signed-off-by: Jesse Taube <jtaubepe@redhat.com> (cherry picked from commit 22b51a2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Latest FPIN-LI changes for native nvme multipath based on Linux 7.2-rc1