nvme-fabrics: Add host support for FC transport
Subsystems (2)
PATCH v4 5/7 nvme-fabrics: Add host support for FC transport
Add nvme-fabrics host support for FC transport
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 FCP operations that comprise NVME over FC operation.
The T11 definitions for FC-4 Link Services are implemented which create NVMeOF connections. Implements the hooks with blk-mq to then submit admin and io requests to the different connections.
---
v4 mods:
- added HAS_DMA to Kconfig
- Changed to support Christophs nvme_request update
- addressed return code in __nvme_fc_abort_op()
- fixed possible op->rq NULL reference in nvme_fc_start_fcp_op()
- FC-NVME v1.11: process transferred length in ersp iu and rsp iu mandates
- Add comments on teardown flow
- fix bad cqe reference in fcpio_done
MAINTAINERS | 1 + drivers/nvme/host/Kconfig | 17 + drivers/nvme/host/Makefile | 3 + drivers/nvme/host/fc.c | 2441 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 2462 insertions(+) create mode 100644 drivers/nvme/host/fc.c
MAINTAINERS +1 -0
@@ -8666,6 +8666,7 @@ L: linux-nvme at lists.infradead.org S: Supported F: include/linux/nvme-fc.h F: include/linux/nvme-fc-driver.h +F: drivers/nvme/host/fc.c NVMEM FRAMEWORK M: Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
drivers/nvme/host/Kconfig +17 -0
@@ -43,3 +43,20 @@ config NVME_RDMA from https://github.com/linux-nvme/nvme-cli. If unsure, say N. + +config NVME_FC + tristate "NVM Express over Fabrics FC host driver" + depends on BLOCK + depends on HAS_DMA + select NVME_CORE + select NVME_FABRICS + select SG_POOL + help + This provides support for the NVMe over Fabrics protocol using + the FC transport. This allows you to use remote block devices + exported using the NVMe protocol set. + + To configure a NVMe over Fabrics controller use the nvme-cli tool + from https://github.com/linux-nvme/nvme-cli. + + If unsure, say N.
drivers/nvme/host/Makefile +3 -0
@@ -2,6 +2,7 @@ obj-$(CONFIG_NVME_CORE) += nvme-core.o obj-$(CONFIG_BLK_DEV_NVME) += nvme.o obj-$(CONFIG_NVME_FABRICS) += nvme-fabrics.o obj-$(CONFIG_NVME_RDMA) += nvme-rdma.o +obj-$(CONFIG_NVME_FC) += nvme-fc.o nvme-core-y := core.o nvme-core-$(CONFIG_BLK_DEV_NVME_SCSI) += scsi.o
@@ -12,3 +13,5 @@ nvme-y += pci.o nvme-fabrics-y += fabrics.o nvme-rdma-y += rdma.o + +nvme-fc-y += fc.o
drivers/nvme/host/fc.c new file +2441 -0
2,441 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH v4 5/7 nvme-fabrics: Add host support for FC transport
Quoted 17 lines · James Smart
Add nvme-fabrics host support for FC transport
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 FCP operations that comprise NVME
over FC operation.The T11 definitions for FC-4 Link Services are implemented which create
NVMeOF connections.??Implements the hooks with blk-mq to then submit admin
and io requests to the different connections.Signed-off-by James Smart <james.smart at broadcom.com>
Quoted 10 lines
---
v4 mods:
- addedHAS_DMAtoKconfig
- Changed to support Christophsnvme_requestupdate
- addressed return code in__nvme_fc_abort_op()
- fixed possibleop->rqNULL reference innvme_fc_start_fcp_op()
- FC-NVME v1.11: process transferred length in ersp iu and rsp iu mandates
- Add comments on teardown flow
- fix bad cqe reference infcpio_done
Looks good, nice work James,