[PATCH 00/17] lpfc: Update lpfc to revision 12.8.0.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux