linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/29] nvme-fc/nvmet-fc: Add FC-NVME-2 disconnect association support
@ 2020-02-05 18:37 James Smart
  2020-02-05 18:37 ` [PATCH 01/29] nvme-fc: Sync header to FC-NVME-2 rev 1.08 James Smart
                   ` (30 more replies)
  0 siblings, 31 replies; 80+ messages in thread
From: James Smart @ 2020-02-05 18:37 UTC (permalink / raw)
  To: linux-nvme; +Cc: James Smart, martin.petersen

At the tail end of FC-NVME (1) standardization, the process for
terminating an association was changed requiring interlock using FC-NVME
Disconnect Assocation LS's between both the host port and target port.
This was immediately relaxed with an ammendment to FC-NVME (1) and with
wording put into FC-NVME-2. The interlock was removed, but it still
required both the host port and target port to initiate Disconnect
Association LS's and respond to LS's.

The linux nvme-fc and nvmet-fc implementations were interoperable with
standards but the linux-driver api did not support all the functionality
needed. It was missing:
- nvme-fc: didn't support the reception of NVME LS's and the ability to
  transmit responses to an LS.
- nvmet-fc: didn't support the ability to send an NVME LS request. It
  also did not support a method for the transport to specify a remote
  port for an LS.

This patch adds the missing functionality. Specifically the patch set:
- Updates the header with the FC-NVME-2 standard out for final approval.
- Refactors data structure names that used to be dependent on role (ls
  requests were specific to nvme; ls responses were specific to nvmet)
  to generic names that can be used by both nvme-fc and nvmet-fc.
- Modifies the nvme-fc transport template with interfaces to receive
  NVME LS's and for the transport to then request LS responses to be
  sent.
- Modifies the nvmet-fc transport template with:
  - The current NVME LS receive interface was modified to supply a
    handle to indentify the remote port the LS as received from. If
    the LS creates an association, the handle may be used to initiate
    NVME LS requests to the remote port. An interface was put in place
    to invalidate the handle on connectivity losses.
  - Interfaces for the transport to request an NVME LS request to be
    performed as well as to abort that LS in cases of error/teardown. 
- The nvme-fc transport was modified to follow the standard:
  - Disconnect association logic was revised to send Disconnect LS as
    soon as all ABTS's were transmit rather than waiting for the ABTS
    process to fully complete.
  - Disconnect LS reception is supported, with reception initiating
    controller reset and reconnect.
  - Disconnect LS responses will not be transmit until association
    termination has transmit the Disconnect LS.
- The nvmet-fc transport was modified to follow the standard:
  - Disconnect assocation logic was revised to transmit a Disconnect LS
    request as soon as all ABTS's have been transmit. In the past, no
    Disconnect LS had been transmit.
  - Disconnect LS responses will not be sent until the Disconnect LS
    request has been transmit.
- nvme-fcloop: was updated with interfaces to allow testing of the
  transports.
- Along the way, cleanups and slight corrections were made to the
  transports.
- The lpfc driver was modified to support the new transport interfaces
  for both the nvme and nvmet transports.  As much of the functionality
  was already present, but specific to one side of the transport,
  existing code was refactored to create common routines. Addition of
  the new interfaces was able to slip in rather easily with the common
  routines.

This code was cut against the for-5.6 branch.

I'll work with Martin to minimize any work to merge these lpfc mods 
with lpfc changes in the scsi tree.

-- james



James Smart (29):
  nvme-fc: Sync header to FC-NVME-2 rev 1.08
  nvmet-fc: fix typo in comment
  nvme-fc and nvmet-fc: revise LLDD api for LS reception and LS request
  nvme-fc nvmet_fc nvme_fcloop: adapt code to changed names in api
    header
  lpfc: adapt code to changed names in api header
  nvme-fcloop: Fix deallocation of working context
  nvme-fc nvmet-fc: refactor for common LS definitions
  nvmet-fc: Better size LS buffers
  nvme-fc: Ensure private pointers are NULL if no data
  nvmefc: Use common definitions for LS names, formatting, and
    validation
  nvme-fc: convert assoc_active flag to atomic
  nvme-fc: Add Disconnect Association Rcv support
  nvmet-fc: add LS failure messages
  nvmet-fc: perform small cleanups on unneeded checks
  nvmet-fc: track hostport handle for associations
  nvmet-fc: rename ls_list to ls_rcv_list
  nvmet-fc: Add Disconnect Association Xmt support
  nvme-fcloop: refactor to enable target to host LS
  nvme-fcloop: add target to host LS request support
  lpfc: Refactor lpfc nvme headers
  lpfc: Refactor nvmet_rcv_ctx to create lpfc_async_xchg_ctx
  lpfc: Commonize lpfc_async_xchg_ctx state and flag definitions
  lpfc: Refactor NVME LS receive handling
  lpfc: Refactor Send LS Request support
  lpfc: Refactor Send LS Abort support
  lpfc: Refactor Send LS Response support
  lpfc: nvme: Add Receive LS Request and Send LS Response support to
    nvme
  lpfc: nvmet: Add support for NVME LS request hosthandle
  lpfc: nvmet: Add Send LS Request and Abort LS Request support

 drivers/nvme/host/fc.c             | 555 +++++++++++++++++++-----
 drivers/nvme/host/fc.h             | 227 ++++++++++
 drivers/nvme/target/fc.c           | 800 +++++++++++++++++++++++++----------
 drivers/nvme/target/fcloop.c       | 228 ++++++++--
 drivers/scsi/lpfc/lpfc.h           |   2 +-
 drivers/scsi/lpfc/lpfc_attr.c      |   3 -
 drivers/scsi/lpfc/lpfc_crtn.h      |   9 +-
 drivers/scsi/lpfc/lpfc_ct.c        |   1 -
 drivers/scsi/lpfc/lpfc_debugfs.c   |   5 +-
 drivers/scsi/lpfc/lpfc_hbadisc.c   |   8 +-
 drivers/scsi/lpfc/lpfc_init.c      |   7 +-
 drivers/scsi/lpfc/lpfc_mem.c       |   4 -
 drivers/scsi/lpfc/lpfc_nportdisc.c |  13 +-
 drivers/scsi/lpfc/lpfc_nvme.c      | 550 ++++++++++++++++--------
 drivers/scsi/lpfc/lpfc_nvme.h      | 198 +++++++++
 drivers/scsi/lpfc/lpfc_nvmet.c     | 837 +++++++++++++++++++++++--------------
 drivers/scsi/lpfc/lpfc_nvmet.h     | 158 -------
 drivers/scsi/lpfc/lpfc_sli.c       | 126 +++++-
 include/linux/nvme-fc-driver.h     | 368 +++++++++++-----
 include/linux/nvme-fc.h            |   9 +-
 20 files changed, 2970 insertions(+), 1138 deletions(-)
 create mode 100644 drivers/nvme/host/fc.h
 delete mode 100644 drivers/scsi/lpfc/lpfc_nvmet.h

-- 
2.13.7


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

end of thread, other threads:[~2020-03-31 15:55 UTC | newest]

Thread overview: 80+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 18:37 [PATCH 00/29] nvme-fc/nvmet-fc: Add FC-NVME-2 disconnect association support James Smart
2020-02-05 18:37 ` [PATCH 01/29] nvme-fc: Sync header to FC-NVME-2 rev 1.08 James Smart
2020-02-28 20:36   ` Sagi Grimberg
2020-03-06  8:16   ` Hannes Reinecke
2020-03-26 16:10   ` Himanshu Madhani
2020-02-05 18:37 ` [PATCH 02/29] nvmet-fc: fix typo in comment James Smart
2020-02-28 20:36   ` Sagi Grimberg
2020-03-06  8:17   ` Hannes Reinecke
2020-03-26 16:10   ` Himanshu Madhani
2020-02-05 18:37 ` [PATCH 03/29] nvme-fc and nvmet-fc: revise LLDD api for LS reception and LS request James Smart
2020-02-28 20:38   ` Sagi Grimberg
2020-03-06  8:19   ` Hannes Reinecke
2020-03-26 16:16   ` Himanshu Madhani
2020-02-05 18:37 ` [PATCH 04/29] nvme-fc nvmet_fc nvme_fcloop: adapt code to changed names in api header James Smart
2020-02-28 20:40   ` Sagi Grimberg
2020-03-06  8:21   ` Hannes Reinecke
2020-03-26 16:26   ` Himanshu Madhani
2020-02-05 18:37 ` [PATCH 05/29] lpfc: " James Smart
2020-02-28 20:40   ` Sagi Grimberg
2020-03-06  8:25   ` Hannes Reinecke
2020-03-26 16:30   ` Himanshu Madhani
2020-02-05 18:37 ` [PATCH 06/29] nvme-fcloop: Fix deallocation of working context James Smart
2020-02-28 20:43   ` Sagi Grimberg
2020-03-06  8:34   ` Hannes Reinecke
2020-03-26 16:35   ` Himanshu Madhani
2020-02-05 18:37 ` [PATCH 07/29] nvme-fc nvmet-fc: refactor for common LS definitions James Smart
2020-03-06  8:35   ` Hannes Reinecke
2020-03-26 16:36   ` Himanshu Madhani
2020-02-05 18:37 ` [PATCH 08/29] nvmet-fc: Better size LS buffers James Smart
2020-02-28 21:04   ` Sagi Grimberg
2020-03-06  8:36   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 09/29] nvme-fc: Ensure private pointers are NULL if no data James Smart
2020-02-28 21:05   ` Sagi Grimberg
2020-03-06  8:44   ` Hannes Reinecke
2020-03-26 16:39   ` Himanshu Madhani
2020-02-05 18:37 ` [PATCH 10/29] nvmefc: Use common definitions for LS names, formatting, and validation James Smart
2020-03-06  8:44   ` Hannes Reinecke
2020-03-26 16:41   ` Himanshu Madhani
2020-02-05 18:37 ` [PATCH 11/29] nvme-fc: convert assoc_active flag to atomic James Smart
2020-02-28 21:08   ` Sagi Grimberg
2020-03-06  8:47   ` Hannes Reinecke
2020-03-26 19:16   ` Himanshu Madhani
2020-02-05 18:37 ` [PATCH 12/29] nvme-fc: Add Disconnect Association Rcv support James Smart
2020-03-06  9:00   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 13/29] nvmet-fc: add LS failure messages James Smart
2020-03-06  9:01   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 14/29] nvmet-fc: perform small cleanups on unneeded checks James Smart
2020-03-06  9:01   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 15/29] nvmet-fc: track hostport handle for associations James Smart
2020-03-06  9:02   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 16/29] nvmet-fc: rename ls_list to ls_rcv_list James Smart
2020-03-06  9:03   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 17/29] nvmet-fc: Add Disconnect Association Xmt support James Smart
2020-03-06  9:04   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 18/29] nvme-fcloop: refactor to enable target to host LS James Smart
2020-03-06  9:06   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 19/29] nvme-fcloop: add target to host LS request support James Smart
2020-03-06  9:07   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 20/29] lpfc: Refactor lpfc nvme headers James Smart
2020-03-06  9:18   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 21/29] lpfc: Refactor nvmet_rcv_ctx to create lpfc_async_xchg_ctx James Smart
2020-03-06  9:19   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 22/29] lpfc: Commonize lpfc_async_xchg_ctx state and flag definitions James Smart
2020-03-06  9:19   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 23/29] lpfc: Refactor NVME LS receive handling James Smart
2020-03-06  9:20   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 24/29] lpfc: Refactor Send LS Request support James Smart
2020-03-06  9:20   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 25/29] lpfc: Refactor Send LS Abort support James Smart
2020-03-06  9:21   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 26/29] lpfc: Refactor Send LS Response support James Smart
2020-03-06  9:21   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 27/29] lpfc: nvme: Add Receive LS Request and Send LS Response support to nvme James Smart
2020-03-06  9:23   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 28/29] lpfc: nvmet: Add support for NVME LS request hosthandle James Smart
2020-03-06  9:23   ` Hannes Reinecke
2020-02-05 18:37 ` [PATCH 29/29] lpfc: nvmet: Add Send LS Request and Abort LS Request support James Smart
2020-03-06  9:24   ` Hannes Reinecke
2020-03-06  9:26 ` [PATCH 00/29] nvme-fc/nvmet-fc: Add FC-NVME-2 disconnect association support Hannes Reinecke
2020-03-31 14:29 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).