nvme-fabrics: Add target FC transport support
Subsystems (3)
PATCH 6/7 nvme-fabrics: Add target FC transport support
Add nvme-fabrics target FC transport support
Implements the FC-NVME T11 definition of how nvme fabric capsules are performed on an FC fabric. Utilizes a lower-layer API to FC host adapters to send/receive FC-4 LS operations and perform the FCP transactions necessary to perform and FCP IO request for NVME.
The T11 definitions for FC-4 Link Services are implemented which create NVMeOF connections. Implements the hooks with nvmet layer to pass NVME commands to it for processing and posting of data/response base to the host via the different connections.
The changes made since the prior patch:
- Remove the todo's around dma_map_page(). No need to use dma_map_page()
- Fix nvme_fc_register_targetport() comments per review
- in LS handlers, standardized failure codes and meanings
- Print NVMET_NR_QUEUES when we dislike its value
- Fix return code handling in nvmet_fc_handle_ls_rqst() per review
- Reworked teardown paths with ref counting
- Teardown now invokes callbacks on completion of unregister functions
- Removal of fabric name for nport qualifier. Not necessary in T11
--- drivers/nvme/target/Kconfig | 10 + drivers/nvme/target/Makefile | 2 + drivers/nvme/target/fc.c | 1969 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1981 insertions(+) create mode 100644 drivers/nvme/target/fc.c
drivers/nvme/target/Kconfig +10 -0
@@ -34,3 +34,13 @@ config NVME_TARGET_RDMA devices over RDMA. If unsure, say N. + +config NVME_TARGET_FC + tristate "NVMe over Fabrics FC target driver" + select NVME_TARGET + help + This enables the NVMe FC target support, which allows exporting NVMe + devices over FC. + + If unsure, say N. +
drivers/nvme/target/Makefile +2 -0
@@ -2,8 +2,10 @@ obj-$(CONFIG_NVME_TARGET) += nvmet.o obj-$(CONFIG_NVME_TARGET_LOOP) += nvme-loop.o obj-$(CONFIG_NVME_TARGET_RDMA) += nvmet-rdma.o +obj-$(CONFIG_NVME_TARGET_FC) += nvmet-fc.o nvmet-y += core.o configfs.o admin-cmd.o io-cmd.o fabrics-cmd.o \ discovery.o nvme-loop-y += loop.o nvmet-rdma-y += rdma.o +nvmet-fc-y += fc.o
drivers/nvme/target/fc.c new file +1969 -0
1,969 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH 6/7 nvme-fabrics: Add target FC transport support
Quoted 23 lines · James Smart
Add nvme-fabrics target FC transport support
Implements the FC-NVME T11 definition of how nvme fabric capsules are performed on an FC fabric. Utilizes a lower-layer API to FC host adapters to send/receive FC-4 LS operations and perform the FCP transactions necessary to perform and FCP IO request for NVME.
The T11 definitions for FC-4 Link Services are implemented which create NVMeOF connections. Implements the hooks with nvmet layer to pass NVME commands to it for processing and posting of data/response base to the host via the different connections.
The changes made since the prior patch:
- Remove the todo's arounddma_map_page(). No need to usedma_map_page()
- Fixnvme_fc_register_targetport()comments per review
- in LS handlers, standardized failure codes and meaningsNVMET_NR_QUEUESwhen we dislike its value
- Fix return code handling innvmet_fc_handle_ls_rqst()per review
- Reworked teardown paths with ref counting
- Teardown now invokes callbacks on completion of unregister functions
- Removal of fabric name for nport qualifier. Not necessary in T11
Quoted 8 lines
Signed-off-by James Smart <james.smart at broadcom.com>--- drivers/nvme/target/Kconfig | 10 + drivers/nvme/target/Makefile | 2 + drivers/nvme/target/fc.c | 1969 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1981 insertions(+) create mode 100644 drivers/nvme/target/fc.c
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke zSeries & Storage hare at suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: J. Hawn, J. Guild, F. Imend?rffer, HRB 16746 (AG N?rnberg)