From: James Smart <james.smart@broadcom.com>
To: linux-scsi@vger.kernel.org
Cc: James Smart <james.smart@broadcom.com>
Subject: [PATCH 00/17] lpfc: Update lpfc to revision 12.8.0.6
Date: Sun, 15 Nov 2020 11:26:29 -0800 [thread overview]
Message-ID: <20201115192646.12977-1-james.smart@broadcom.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5459 bytes --]
Update lpfc to revision 12.8.0.6
This patch set contains several sets of recoding and refactoring.
A close look was taken at the driver to identify what was causing
continual small state machine errors as well other repeatitive issues.
Code review showed several things and this is the first set of changes
to address the deficiencies.
This set of changes addresses the following items:
Remote Port (node/ndlp) handling in the discovery engine:
It was rather clear that the implementation of refcounting on the
remote port node was improper. A refcount going to zero didn't
simply release the node. Instead other logic kicked into play. This
then caused other code to be placed within the discovery engine to
for node removal, ... if it was actually removed. What happened in
many cases was the node structure continued to exist beyond the
existence of the remote port. It was stored in a node list that
could then be matched by re-discovery events. And it also caused
multiple structures to exist on the node list for the same device.
So this area has been significantly reworked to go back to a
standard ref counting scheme, which of course meant that the base
model for when and how to take references had to be re-addressed in
the different code flows.
And of course, once one thing starts working right, new issues were
seen. This brought out inconsistencies on when the node is "freed"
around transport devloss callbacks which led to stale pointer
accesses which had to be addressed. Another example was NPIV, where
it brought out a different handling for nodes on an NPIV vport vs
the same nodes on a standard physical port. So this was corrected as
well.
While working on the above, it was rather clear that global host
locks were taken for node-specific structure changes and the locking
was too coarse. Discovery code was reworked to support a node-level
lock.
Native SLI-4 WQE use:
The other area that was rather ugly was sli-4 handling. Discovery
and SCSI io paths were implemented as iocb's, which is a SLI-3
construct. The code then, when on SLI-4 hardware, converted to SLI-4
WQEs to then talk to the hardware. However, the nvme path, which is
only supported on SLI-4, was only implemnted with WQEs. What it
meant was: there were very subtle bugs creeping in as SLI-4 data
structures didn't fully overlay on the SLI-3 structures; there was
a lot of duplication of code in different areas; and with the
duplication came differences and confusion.
This patch set reorganizes the IO paths, which includes abort paths,
into a formal division between SLI-3 and SLI-4. The basic style is a
common routine is called by a code path, which identifies the hw
type, and then vectors into SLI-type specific routines which deal
specifically with iocbs or WQEs. With different command types also
comes different completion handlers. Although these changes look
like a lot of change it is mostly a large refactoring. Old common
layers that performed iocb-specific work was moved to SLI-3-specific
routines, and routines were created for SLI-4. For SLI-4, a lot of
code came from the nvme routines.
The end result is the common routines, with SLI-4 being natively
supported for ELS and SCSI & NVME initiator io paths.
The patches were cut against Martin's 5.11/scsi-queue tree
James Smart (17):
lpfc: Rework remote port ref counting and node freeing
lpfc: Rework locations of ndlp reference taking
lpfc: Fix removal of scsi transport device get and put on dev
structure
lpfc: Fix refcounting around scsi and nvme transport apis
lpfc: Rework remote port lock handling
lpfc: Remove ndlp when a PLOGI/ADISC/PRLI/REG_RPI ultimately fails
lpfc: Unsolicited ELS leaves node in incorrect state while dropping it
lpfc: Fix NPIV discovery and Fabric Node detection
lpfc: Fix NPIV Fabric Node reference counting
lpfc: Refactor wqe structure definitions for common use
lpfc: Enable common wqe_template support for both scsi and nvme
lpfc: Enable common send_io interface for SCSI and NVME
lpfc: convert scsi path to use common io submission path
lpfc: convert scsi io completions to sli-3 and sli-4 handlers
lpfc: Convert abort handling to sli-3 and sli-4 handlers
lpfc: Update lpfc version to 12.8.0.6
lpfc: Update changed file copyrights for 2020
drivers/scsi/lpfc/lpfc.h | 9 +-
drivers/scsi/lpfc/lpfc_attr.c | 19 +-
drivers/scsi/lpfc/lpfc_bsg.c | 79 +-
drivers/scsi/lpfc/lpfc_crtn.h | 18 +-
drivers/scsi/lpfc/lpfc_ct.c | 81 +-
drivers/scsi/lpfc/lpfc_debugfs.c | 8 +-
drivers/scsi/lpfc/lpfc_disc.h | 45 +-
drivers/scsi/lpfc/lpfc_els.c | 1285 +++++++++++++++-------------
drivers/scsi/lpfc/lpfc_hbadisc.c | 754 +++++-----------
drivers/scsi/lpfc/lpfc_hw4.h | 12 +-
drivers/scsi/lpfc/lpfc_init.c | 121 ++-
drivers/scsi/lpfc/lpfc_nportdisc.c | 215 ++---
drivers/scsi/lpfc/lpfc_nvme.c | 326 ++-----
drivers/scsi/lpfc/lpfc_nvme.h | 4 +-
drivers/scsi/lpfc/lpfc_nvmet.c | 60 +-
drivers/scsi/lpfc/lpfc_scsi.c | 1133 ++++++++++++++++++------
drivers/scsi/lpfc/lpfc_sli.c | 659 +++++++++-----
drivers/scsi/lpfc/lpfc_sli.h | 7 +-
drivers/scsi/lpfc/lpfc_version.h | 4 +-
drivers/scsi/lpfc/lpfc_vport.c | 128 +--
20 files changed, 2719 insertions(+), 2248 deletions(-)
--
2.26.2
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4163 bytes --]
next reply other threads:[~2020-11-15 19:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-15 19:26 James Smart [this message]
2020-11-15 19:26 ` [PATCH 01/17] lpfc: Rework remote port ref counting and node freeing James Smart
2020-11-15 19:26 ` [PATCH 02/17] lpfc: Rework locations of ndlp reference taking James Smart
2020-11-15 19:26 ` [PATCH 03/17] lpfc: Fix removal of scsi transport device get and put on dev structure James Smart
2020-11-15 19:26 ` [PATCH 04/17] lpfc: Fix refcounting around scsi and nvme transport apis James Smart
2020-11-15 19:26 ` [PATCH 05/17] lpfc: Rework remote port lock handling James Smart
2020-11-15 19:26 ` [PATCH 06/17] lpfc: Remove ndlp when a PLOGI/ADISC/PRLI/REG_RPI ultimately fails James Smart
2020-11-15 19:26 ` [PATCH 07/17] lpfc: Unsolicited ELS leaves node in incorrect state while dropping it James Smart
2020-11-15 19:26 ` [PATCH 08/17] lpfc: Fix NPIV discovery and Fabric Node detection James Smart
2020-11-15 19:26 ` [PATCH 09/17] lpfc: Fix NPIV Fabric Node reference counting James Smart
2020-11-15 19:26 ` [PATCH 10/17] lpfc: Refactor wqe structure definitions for common use James Smart
2020-11-15 19:26 ` [PATCH 11/17] lpfc: Enable common wqe_template support for both scsi and nvme James Smart
2020-11-15 19:26 ` [PATCH 12/17] lpfc: Enable common send_io interface for SCSI and NVME James Smart
2020-11-15 19:26 ` [PATCH 13/17] lpfc: convert scsi path to use common io submission path James Smart
2020-11-15 19:26 ` [PATCH 14/17] lpfc: convert scsi io completions to sli-3 and sli-4 handlers James Smart
2020-11-15 19:26 ` [PATCH 15/17] lpfc: Convert abort handling " James Smart
2020-11-15 19:26 ` [PATCH 16/17] lpfc: Update lpfc version to 12.8.0.6 James Smart
2020-11-15 19:26 ` [PATCH 17/17] lpfc: Update changed file copyrights for 2020 James Smart
2020-11-17 5:45 ` [PATCH 00/17] lpfc: Update lpfc to revision 12.8.0.6 Martin K. Petersen
2020-11-20 3:29 ` Martin K. Petersen
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=20201115192646.12977-1-james.smart@broadcom.com \
--to=james.smart@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
/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