Skip to content

Commit a07b497

Browse files
Christoph Hellwigaxboe
authored andcommitted
nvmet: add a generic NVMe target
This patch introduces a implementation of NVMe subsystems, controllers and discovery service which allows to export NVMe namespaces across fabrics such as Ethernet, FC etc. The implementation conforms to the NVMe 1.2.1 specification and interoperates with NVMe over fabrics host implementations. Configuration works using configfs, and is best performed using the nvmetcli tool from http://git.infradead.org/users/hch/nvmetcli.git, which also has a detailed explanation of the required steps in the README file. Signed-off-by: Armen Baloyan <armenx.baloyan@intel.com> Signed-off-by: Anthony Knapp <anthony.j.knapp@intel.com> 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>
1 parent 9645c1a commit a07b497

File tree

12 files changed

+3383
-0
lines changed

12 files changed

+3383
-0
lines changed

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8153,6 +8153,13 @@ S: Supported
81538153
F: drivers/nvme/host/
81548154
F: include/linux/nvme.h
81558155

8156+
NVM EXPRESS TARGET DRIVER
8157+
M: Christoph Hellwig <hch@lst.de>
8158+
M: Sagi Grimberg <sagi@grimberg.me>
8159+
L: linux-nvme@lists.infradead.org
8160+
S: Supported
8161+
F: drivers/nvme/target/
8162+
81568163
NVMEM FRAMEWORK
81578164
M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
81588165
M: Maxime Ripard <maxime.ripard@free-electrons.com>

drivers/nvme/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
source "drivers/nvme/host/Kconfig"
2+
source "drivers/nvme/target/Kconfig"

drivers/nvme/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

22
obj-y += host/
3+
obj-y += target/

drivers/nvme/target/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
config NVME_TARGET
3+
tristate "NVMe Target support"
4+
depends on BLOCK
5+
depends on CONFIGFS_FS
6+
help
7+
This enabled target side support for the NVMe protocol, that is
8+
it allows the Linux kernel to implement NVMe subsystems and
9+
controllers and export Linux block devices as NVMe namespaces.
10+
You need to select at least one of the transports below to make this
11+
functionality useful.
12+
13+
To configure the NVMe target you probably want to use the nvmetcli
14+
tool from http://git.infradead.org/users/hch/nvmetcli.git.
15+
16+
If unsure, say N.

drivers/nvme/target/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
obj-$(CONFIG_NVME_TARGET) += nvmet.o
3+
4+
nvmet-y += core.o configfs.o admin-cmd.o io-cmd.o fabrics-cmd.o \
5+
discovery.o

0 commit comments

Comments
 (0)