From af2520440494ab2cfc2b6f9a6d3e94a870dafbfc Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 30 Apr 2019 15:57:29 -0700 Subject: [PATCH] bdev/nvme: always enable FTL FTL doesn't have any kind of special package requirements. It is getting pretty good traction in the community, so let's enable it by default. Note that we will disable FTL on FreeBSD. FTL uses CIRCLEQ which is not available on FreeBSD. Let's not spend time trying to get FTL to work on FreeBSD until there's a demand to do so. Signed-off-by: Jim Harris Change-Id: I15525b6c4e6ee52f49adf74d55f9484fe08a6dcc Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452752 Tested-by: SPDK CI Jenkins Reviewed-by: Paul Luse Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk --- CONFIG | 3 --- configure | 8 -------- lib/Makefile | 3 +-- lib/bdev/nvme/Makefile | 5 ++--- mk/spdk.modules.mk | 5 +---- test/common/autotest_common.sh | 4 ---- test/unit/lib/Makefile | 3 +-- test/unit/unittest.sh | 2 -- 8 files changed, 5 insertions(+), 28 deletions(-) diff --git a/CONFIG b/CONFIG index 256a553fe..e9b224546 100644 --- a/CONFIG +++ b/CONFIG @@ -126,9 +126,6 @@ CONFIG_VTUNE_DIR= # Build the dpdk igb_uio driver CONFIG_IGB_UIO_DRIVER=n -# Build FTL library -CONFIG_FTL=n - # Build Intel IPSEC_MB library CONFIG_IPSEC_MB=n diff --git a/configure b/configure index 8e0b66eb5..46ec210b7 100755 --- a/configure +++ b/configure @@ -75,8 +75,6 @@ function usage() echo " example: /usr/src/ocf/" echo " isal Enabled by default on x86 architecture. Can be built without though." echo " No path required." - echo " ftl Required to build FTL module." - echo " No path required." echo " uring Required to support I/O uring on Linux. If no argument, searches" echo " the standard installation directory. If an argument is provided, it is" echo " considered a directory containing liburing.a and io_uring.h." @@ -293,12 +291,6 @@ for i in "$@"; do --without-igb-uio-driver) CONFIG[IGB_UIO_DRIVER]=n ;; - --with-ftl) - CONFIG[FTL]=y - ;; - --without-ftl) - CONFIG[FTL]=n - ;; --with-ocf) CONFIG[OCF]=y CONFIG[OCF_PATH]=$(readlink -f "./ocf") diff --git a/lib/Makefile b/lib/Makefile index 5a6d374a0..6908480c4 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -38,13 +38,12 @@ DIRS-y += bdev blob blobfs conf copy event json jsonrpc \ log lvol net rpc sock thread trace util nvme nvmf scsi ioat \ ut_mock iscsi notify ifeq ($(OS),Linux) -DIRS-y += nbd +DIRS-y += nbd ftl DIRS-$(CONFIG_VHOST) += vhost DIRS-$(CONFIG_VIRTIO) += virtio endif DIRS-$(CONFIG_REDUCE) += reduce -DIRS-$(CONFIG_FTL) += ftl # If CONFIG_ENV is pointing at a directory in lib, build it. # Out-of-tree env implementations must be built separately by the user. diff --git a/lib/bdev/nvme/Makefile b/lib/bdev/nvme/Makefile index e92c2d637..7ba62c44a 100644 --- a/lib/bdev/nvme/Makefile +++ b/lib/bdev/nvme/Makefile @@ -35,10 +35,9 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk C_SRCS = bdev_nvme.c bdev_nvme_rpc.c nvme_rpc.c common.c -LIBNAME = bdev_nvme - -ifeq ($(CONFIG_FTL),y) +ifeq ($(OS),Linux) C_SRCS += bdev_ftl.c bdev_ftl_rpc.c endif +LIBNAME = bdev_nvme include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk diff --git a/mk/spdk.modules.mk b/mk/spdk.modules.mk index 7c0815993..a8ff44398 100644 --- a/mk/spdk.modules.mk +++ b/mk/spdk.modules.mk @@ -54,6 +54,7 @@ SYS_LIBS += -libverbs -lrdmacm endif ifeq ($(OS),Linux) +BLOCKDEV_MODULES_LIST += ftl BLOCKDEV_MODULES_LIST += bdev_aio SYS_LIBS += -laio ifeq ($(CONFIG_VIRTIO),y) @@ -85,10 +86,6 @@ BLOCKDEV_MODULES_LIST += bdev_pmem SYS_LIBS += -lpmemblk endif -ifeq ($(CONFIG_FTL),y) -BLOCKDEV_MODULES_LIST += ftl -endif - SOCK_MODULES_LIST = sock_posix ifeq ($(CONFIG_VPP),y) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 3c0b27a86..ee7d6ff02 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -197,10 +197,6 @@ if [ ! -d "${DEPENDENCY_DIR}/nvme-cli" ]; then export SPDK_TEST_NVME_CLI=0 fi -if [ $SPDK_TEST_FTL -eq 1 ]; then - config_params+=' --with-ftl' -fi - if [ $SPDK_TEST_ISAL -eq 0 ]; then config_params+=' --without-isal' fi diff --git a/test/unit/lib/Makefile b/test/unit/lib/Makefile index a271850e0..4a13a55bc 100644 --- a/test/unit/lib/Makefile +++ b/test/unit/lib/Makefile @@ -38,9 +38,8 @@ DIRS-y = bdev blob blobfs event ioat iscsi json jsonrpc log lvol DIRS-y += notify nvme nvmf scsi sock thread util DIRS-$(CONFIG_REDUCE) += reduce ifeq ($(OS),Linux) -DIRS-$(CONFIG_VHOST) += vhost +DIRS-$(CONFIG_VHOST) += vhost ftl endif -DIRS-$(CONFIG_FTL) += ftl .PHONY: all clean $(DIRS-y) diff --git a/test/unit/unittest.sh b/test/unit/unittest.sh index 8f98156a6..73df50c89 100755 --- a/test/unit/unittest.sh +++ b/test/unit/unittest.sh @@ -153,9 +153,7 @@ $valgrind $testdir/lib/util/dif.c/dif_ut if [ $(uname -s) = Linux ]; then $valgrind $testdir/lib/vhost/vhost.c/vhost_ut -fi -if grep -q '#define SPDK_CONFIG_FTL 1' $rootdir/include/spdk/config.h; then $valgrind $testdir/lib/ftl/ftl_rwb.c/ftl_rwb_ut $valgrind $testdir/lib/ftl/ftl_ppa/ftl_ppa_ut $valgrind $testdir/lib/ftl/ftl_band.c/ftl_band_ut