Skip to content

Commit

Permalink
nvme-loop: add a NVMe loopback host driver
Browse files Browse the repository at this point in the history
This patch implements adds nvme-loop which allows to access local devices
exported as NVMe over Fabrics namespaces. This module can be useful for
easy evaluation, testing and also feature experimentation.

To createa nvme-loop device you need to configure the NVMe target to
export a loop port (see the nvmetcli documentaton for that) and then
connect to it using

	nvme connect-all -t loop

which requires the very latest nvme-cli version with Fabrics support.

Signed-off-by: Jay Freyensee <james.p.freyensee@intel.com>
Signed-off-by: Ming Lin <ming.l@ssi.samsung.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Christoph Hellwig authored and axboe committed Jul 5, 2016
1 parent a07b497 commit 3a85a5d
Show file tree
Hide file tree
Showing 3 changed files with 766 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/nvme/target/Kconfig
Expand Up @@ -13,4 +13,14 @@ config NVME_TARGET
To configure the NVMe target you probably want to use the nvmetcli
tool from http://git.infradead.org/users/hch/nvmetcli.git.

config NVME_TARGET_LOOP
tristate "NVMe loopback device support"
depends on BLK_DEV_NVME
select NVME_TARGET
select NVME_FABRICS
select SG_POOL
help
This enables the NVMe loopback device support, which can be useful
to test NVMe host and target side features.

If unsure, say N.
2 changes: 2 additions & 0 deletions drivers/nvme/target/Makefile
@@ -1,5 +1,7 @@

obj-$(CONFIG_NVME_TARGET) += nvmet.o
obj-$(CONFIG_NVME_TARGET_LOOP) += nvme-loop.o

nvmet-y += core.o configfs.o admin-cmd.o io-cmd.o fabrics-cmd.o \
discovery.o
nvme-loop-y += loop.o

0 comments on commit 3a85a5d

Please sign in to comment.