Skip to contentSkip to conversation

nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME

PATCH Superseded James Smart 2 participants 2 messages Nov 4, 2016 – Nov 5, 2016

Subsystems (3)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 7/7 nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME

Add FC LLDD loopback driver to test FC host and target transport within nvme-fabrics

To aid in the development and testing of the lower-level api of the FC transport, this loopback driver has been created to act as if it were a FC hba driver supporting both the host interfaces as well as the target interfaces with the nvme FC transport.

Signed-off-by James Smart <james.smart at broadcom.com>

---
v4 mods:
- corrected newnport memory leak
- Checkpatch updates - S_IWUSR to 0200

 MAINTAINERS                  |    1 +
 drivers/nvme/target/Kconfig  |   13 +
 drivers/nvme/target/Makefile |    2 +
 drivers/nvme/target/fcloop.c | 1147 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 1163 insertions(+)
 create mode 100644 drivers/nvme/target/fcloop.c
MAINTAINERS +1 -0
index ac9d634..ea8bb14 100644
@@ -8668,6 +8668,7 @@ F:	include/linux/nvme-fc.h
 F:	include/linux/nvme-fc-driver.h
 F:	drivers/nvme/host/fc.c
 F:	drivers/nvme/target/fc.c
+F:	drivers/nvme/target/fcloop.c
 
 NVMEM FRAMEWORK
 M:	Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
drivers/nvme/target/Kconfig +13 -0
index 746a63e..d55576f 100644
@@ -45,3 +45,16 @@ config NVME_TARGET_FC
 
 	  If unsure, say N.
 
+config NVME_TARGET_FCLOOP
+	tristate "NVMe over Fabrics FC Transport Loopback Test driver"
+	depends on NVME_TARGET
+	select NVME_CORE
+	select NVME_FABRICS
+	select SG_POOL
+	select NVME_FC
+	select NVME_TARGET_FC
+	help
+	  This enables the NVMe FC loopback test support, which can be useful
+	  to test NVMe-FC transport interfaces.
+
+	  If unsure, say N.
drivers/nvme/target/Makefile +2 -0
index 80b128b..fecc14f 100644
@@ -3,9 +3,11 @@ 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
+obj-$(CONFIG_NVME_TARGET_FCLOOP)	+= nvme-fcloop.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
+nvme-fcloop-y	+= fcloop.o
drivers/nvme/target/fcloop.c new file +1147 -0

1,147 lines not on this page · raw message

Signature · 1 line
2.5.0
#1 lore raw

PATCH v4 7/7 nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME

Quoted 12 lines · James Smart

Add FC LLDD loopback driver to test FC host and target transport within
nvme-fabrics

To aid in the development and testing of the lower-level api of the FC
transport, this loopback driver has been created to act as if it were a
FC hba driver supporting both the host interfaces as well as the target
interfaces with the nvme FC transport.

Quoted 6 lines
Signed-off-by James Smart <james.smart at broadcom.com>

---
v4 mods:
- corrected newnport memory leak
- Checkpatch updates - S_IWUSR to 0200

Looks good,
Reviewed-by: Jay Freyensee <james_p_freyensee at linux.intel.com>