diff --git a/CONFIG b/CONFIG index 7071d95ea..1065c3334 100644 --- a/CONFIG +++ b/CONFIG @@ -69,6 +69,6 @@ CONFIG_FIO_PLUGIN?=n # which is required for building the SPDK FIO plugin. FIO_SOURCE_DIR?=/usr/src/fio -# Build NVMf (NVMe over Fabrics) target. +# Enable RDMA support for the NVMf target. # Requires ibverbs development libraries. -CONFIG_NVMF?=n +CONFIG_RDMA?=n diff --git a/app/Makefile b/app/Makefile index cd2837795..57e052b52 100644 --- a/app/Makefile +++ b/app/Makefile @@ -35,7 +35,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk DIRS-y += trace -DIRS-$(CONFIG_NVMF) += nvmf_tgt +DIRS-$(CONFIG_RDMA) += nvmf_tgt .PHONY: all clean $(DIRS-y) diff --git a/doc/nvmf/getting_started.txt b/doc/nvmf/getting_started.txt index 4417c214c..7911ad6c6 100644 --- a/doc/nvmf/getting_started.txt +++ b/doc/nvmf/getting_started.txt @@ -50,10 +50,10 @@ apt-get install libibverbs-dev librdmacm-dev \endverbatim Then build SPDK with the NVMf target enabled, either by editing CONFIG -to enable CONFIG_NVMF or enabling it on the `make` command line: +to enable CONFIG_RDMA or enabling it on the `make` command line: \verbatim -make CONFIG_NVMF=y +make CONFIG_RDMA=y \endverbatim \section nvmf_config Configuring NVMf diff --git a/lib/Makefile b/lib/Makefile index 2ee15d13d..eda0b8bc6 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -34,9 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -DIRS-y += conf cunit event json jsonrpc log memory rpc trace util nvme ioat - -DIRS-$(CONFIG_NVMF) += nvmf +DIRS-y += conf cunit event json jsonrpc log memory rpc trace util nvme nvmf ioat .PHONY: all clean $(DIRS-y) diff --git a/lib/nvmf/Makefile b/lib/nvmf/Makefile index 7458de751..bc3b9d806 100644 --- a/lib/nvmf/Makefile +++ b/lib/nvmf/Makefile @@ -35,8 +35,10 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) CFLAGS += $(DPDK_INC) LIBNAME = nvmf -C_SRCS = rdma.c port.c conn.c controller.c \ +C_SRCS = port.c conn.c controller.c \ host.c subsystem.c conf.c \ nvmf.c request.c session.c +C_SRCS-$(CONFIG_RDMA) += rdma.c + include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk index 90e30b2b4..c82af652f 100644 --- a/mk/spdk.common.mk +++ b/mk/spdk.common.mk @@ -111,6 +111,9 @@ SYS_LIBS += -lrt MAKEFLAGS += --no-print-directory +C_SRCS += $(C_SRCS-y) +CXX_SRCS += $(CXX_SRCS-y) + OBJS = $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o) DEPFLAGS = -MMD -MP -MF $*.d.tmp diff --git a/scripts/autotest_common.sh b/scripts/autotest_common.sh index 4421bc6bf..84a3b2bc4 100755 --- a/scripts/autotest_common.sh +++ b/scripts/autotest_common.sh @@ -24,7 +24,7 @@ case `uname` in esac if [ -f /usr/include/infiniband/verbs.h ]; then - MAKECONFIG="$MAKECONFIG CONFIG_NVMF=y" + MAKECONFIG="$MAKECONFIG CONFIG_RDMA=y" fi if [ -z "$output_dir" ]; then diff --git a/test/lib/Makefile b/test/lib/Makefile index 07d75f75d..2b376ee9d 100644 --- a/test/lib/Makefile +++ b/test/lib/Makefile @@ -35,7 +35,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk DIRS-y = event log json jsonrpc nvme memory ioat -DIRS-$(CONFIG_NVMF) += nvmf +DIRS-$(CONFIG_RDMA) += nvmf .PHONY: all clean $(DIRS-y)