nvme-fc/nvmet-fc: Add FC-NVME-2 disconnect association support
Status from this message: applied to nvme-5.8.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest26 patches 1 replyApplied
- v129 patches 50 repliesSuperseded
Changes in v2 from the cover letter
Split out 2 fixes into patches sent separately
a typo & fcloop deallocation of context
Patches slightly reordered
Include fix to Connection disconnect LS spotted by Hannes (patch1) Combined header/nvme-fc/nvmet-fc/lpfc sync to api name change into
1 patch (patch2)
Convert assoc_active patch converted to use test_and_set/clear.
Converted other flag field to use same bit routines. (patch 6)
Split common definitions patch into host and target patches
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/26 | nvme-fc: Sync header to FC-NVME-2 rev 1.08include/ | +6 | 0 replies | |
| 2/26 | nvme-fc and nvmet-fc: revise LLDD api for LS reception and LS requestdrivers/ drivers/ drivers/ +3 more | +378 | 0 replies | |
| 3/26 | nvme-fc nvmet-fc: refactor for common LS definitionsdrivers/ drivers/ drivers/ | +143 | 0 replies | |
| 4/26 | nvmet-fc: Better size LS buffersdrivers/ drivers/ | +38 | 0 replies | |
| 5/26 | nvme-fc: Ensure private pointers are NULL if no datadrivers/ drivers/ | +54 | 0 replies | |
| 6/26 | nvme-fc: convert assoc_active flag to bit opdrivers/ | +13 | 0 replies | |
| 7/26 | nvme-fc: Update header and host for common definitions for LS handlingdrivers/ drivers/ | +81 | 0 replies | |
| 8/26 | nvmet-fc: Update target for common definitions for LS handlingdrivers/ | +2 | 0 replies | |
| 9/26 | nvme-fc: Add Disconnect Association Rcv supportdrivers/ | +359 | 0 replies | |
| 10/26 | nvmet-fc: add LS failure messagesdrivers/ | +19 | 0 replies | |
| 11/26 | nvmet-fc: perform small cleanups on unneeded checksdrivers/ | +5 | 0 replies | |
| 12/26 | nvmet-fc: track hostport handle for associationsdrivers/ | +170 | 0 replies | |
| 13/26 | nvmet-fc: rename ls_list to ls_rcv_listdrivers/ | +11 | 0 replies | |
| 14/26 | nvmet-fc: Add Disconnect Association Xmt supportdrivers/ | +286 | 0 replies | |
| 15/26 | nvme-fcloop: refactor to enable target to host LSdrivers/ | +13 | 0 replies | |
| 16/26 | nvme-fcloop: add target to host LS request supportdrivers/ | +118 | 0 replies | |
| 17/26 | lpfc: Refactor lpfc nvme headersdrivers/ drivers/ drivers/ +9 more | +147 | 0 replies | |
| 18/26 | lpfc: Refactor nvmet_rcv_ctx to create lpfc_async_xchg_ctxdrivers/ drivers/ drivers/ +4 more | +63 | 0 replies | |
| 19/26 | lpfc: Commonize lpfc_async_xchg_ctx state and flag definitionsdrivers/ drivers/ drivers/ | +100 | 0 replies | |
| 20/26 | lpfc: Refactor NVME LS receive handlingdrivers/ drivers/ drivers/ +2 more | +184 | 0 replies | |
| 21/26 | lpfc: Refactor Send LS Request supportdrivers/ drivers/ | +184 | 0 replies | |
| 22/26 | lpfc: Refactor Send LS Abort supportdrivers/ drivers/ | +77 | 0 replies | |
| 23/26 | lpfc: Refactor Send LS Response supportdrivers/ drivers/ | +184 | 0 replies | |
| 24/26 | lpfc: nvme: Add Receive LS Request and Send LS Response support to nvmedrivers/ | +71 | 0 replies | |
| 25/26 | lpfc: nvmet: Add support for NVME LS request hosthandledrivers/ drivers/ drivers/ +2 more | +74 | 0 replies | |
| 26/26 | lpfc: nvmet: Add Send LS Request and Abort LS Request supportdrivers/ | +95 | 0 replies |
Reviews trailers per patch
21 of 26 patches have a Reviewed-by or Acked-by.
| Patch | Sagi Grimberg | Himanshu Madhani | Hannes Reinecke |
|---|---|---|---|
| 1/26 | R-b | R-b | R-b |
| 2/26 | R-b | R-b | |
| 3/26 | R-b | R-b | |
| 4/26 | R-b | R-b | |
| 5/26 | R-b | R-b | R-b |
| 6/26 | |||
| 7/26 | R-b | R-b | |
| 8/26 | R-b | R-b | |
| 9/26 | R-b | ||
| 10/26 | R-b | ||
| 11/26 | |||
| 12/26 | R-b | ||
| 13/26 | R-b | ||
| 14/26 | |||
| 15/26 | R-b | ||
| 16/26 | R-b | ||
| 17/26 | R-b | ||
| 18/26 | R-b | ||
| 19/26 | R-b | ||
| 20/26 | R-b | ||
| 21/26 | R-b | ||
| 22/26 | R-b | ||
| 23/26 | R-b | ||
| 24/26 | |||
| 25/26 | R-b | ||
| 26/26 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 00/26] nvme-fc/nvmet-fc: Add FC-NVME-2 disconnect association support
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.7 branch.
I'll work with Martin to minimize any work to merge these lpfc mods with lpfc changes in the scsi tree.
V2 changes:
Split out 2 fixes into patches sent separately
a typo & fcloop deallocation of context
Patches slightly reordered
Include fix to Connection disconnect LS spotted by Hannes (patch1) Combined header/nvme-fc/nvmet-fc/lpfc sync to api name change into
1 patch (patch2)
Convert assoc_active patch converted to use test_and_set/clear.
Converted other flag field to use same bit routines. (patch 6)
Split common definitions patch into host and target patches
(patches 8 & 9)
Remove unused local variable writedataactive (patch 11)
Replaced c++ style comment (patch 14)
Moved location of lsdir field (patch 15)
Removed atomic stats from lpfc that aren't necessary
(patches 24 & 26)Add reviewed by's from Sagi, Hannes, Himanshu
-- james
James Smart (26):
nvme-fc: Sync header to FC-NVME-2 rev 1.08
nvme-fc and nvmet-fc: revise LLDD api for LS reception and LS request 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
nvme-fc: convert assoc_active flag to bit op
nvme-fc: Update header and host for common definitions for LS handling
nvmet-fc: Update target for common definitions for LS handling
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 | 569 ++++++++++++++++++++------ drivers/nvme/host/fc.h | 227 +++++++++++ drivers/nvme/target/fc.c | 798 ++++++++++++++++++++++++++---------- drivers/nvme/target/fcloop.c | 155 ++++++- 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 | 491 ++++++++++++++-------- drivers/scsi/lpfc/lpfc_nvme.h | 181 +++++++++ drivers/scsi/lpfc/lpfc_nvmet.c | 804 ++++++++++++++++++++++--------------- 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 | 11 +- 20 files changed, 2808 insertions(+), 1132 deletions(-) create mode 100644 drivers/nvme/host/fc.h delete mode 100644 drivers/scsi/lpfc/lpfc_nvmet.h
Signature · 7 lines
2.16.4 _______________________________________________ linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme