diff --git a/CONFIG b/CONFIG index 1d147e1cc..1d8e2ae45 100644 --- a/CONFIG +++ b/CONFIG @@ -45,7 +45,7 @@ CONFIG_ADDRESS_SANITIZER?=n # Directory that contains the desired SPDK environment library. # By default, this is implemented using DPDK. -CONFIG_ENV?=$(SPDK_ROOT_DIR)/lib/env +CONFIG_ENV?=$(SPDK_ROOT_DIR)/lib/env_dpdk # This directory should contain 'include' and 'lib' directories for your DPDK # installation. Alternatively you can specify this on the command line diff --git a/PORTING.md b/PORTING.md index 767d39153..b595c85f7 100644 --- a/PORTING.md +++ b/PORTING.md @@ -10,7 +10,7 @@ defined in [include/spdk/env.h](include/spdk/env.h). SPDK includes a default implementation of the *env* library based on the Data Plane Development Kit ([DPDK](http://dpdk.org/)). -This DPDK implementation can be found in `lib/env`. +This DPDK implementation can be found in `lib/env_dpdk`. DPDK is currently supported on Linux and FreeBSD only. Users who want to use SPDK on other operating systems, or in @@ -19,4 +19,4 @@ a new version of the *env* library. The new implementation can be integrated into the SPDK build by updating the following line in CONFIG: - CONFIG_ENV?=$(SPDK_ROOT_DIR)/lib/env + CONFIG_ENV?=$(SPDK_ROOT_DIR)/lib/env_dpdk diff --git a/lib/Makefile b/lib/Makefile index edcc44f9d..3f86753b9 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -35,7 +35,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk DIRS-y += bdev conf copy cunit event json jsonrpc \ - log env net rpc trace util nvme nvmf scsi ioat + log env_dpdk net rpc trace util nvme nvmf scsi ioat ifeq ($(OS),Linux) DIRS-y += iscsi endif diff --git a/lib/env/Makefile b/lib/env_dpdk/Makefile similarity index 98% rename from lib/env/Makefile rename to lib/env_dpdk/Makefile index 08bf1b3bd..0368465e7 100644 --- a/lib/env/Makefile +++ b/lib/env_dpdk/Makefile @@ -36,6 +36,6 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk CFLAGS += $(DPDK_INC) C_SRCS = env.c pci.c vtophys.c -LIBNAME = env +LIBNAME = env_dpdk include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk diff --git a/lib/env/env.c b/lib/env_dpdk/env.c similarity index 100% rename from lib/env/env.c rename to lib/env_dpdk/env.c diff --git a/lib/env/env.mk b/lib/env_dpdk/env.mk similarity index 94% rename from lib/env/env.mk rename to lib/env_dpdk/env.mk index 7b1c1a2b6..be0e55b27 100644 --- a/lib/env/env.mk +++ b/lib/env_dpdk/env.mk @@ -68,5 +68,5 @@ endif ENV_CFLAGS = $(DPDK_INC) ENV_CXXFLAGS = $(ENV_CFLAGS) -ENV_LIBS = $(SPDK_ROOT_DIR)/lib/env/libspdk_env.a $(DPDK_LIB) -ENV_LINKER_ARGS = -Wl,--start-group -Wl,--whole-archive $(SPDK_ROOT_DIR)/lib/env/libspdk_env.a $(DPDK_LIB) -Wl,--end-group -Wl,--no-whole-archive +ENV_LIBS = $(SPDK_ROOT_DIR)/lib/env_dpdk/libspdk_env_dpdk.a $(DPDK_LIB) +ENV_LINKER_ARGS = -Wl,--start-group -Wl,--whole-archive $(SPDK_ROOT_DIR)/lib/env_dpdk/libspdk_env_dpdk.a $(DPDK_LIB) -Wl,--end-group -Wl,--no-whole-archive diff --git a/lib/env/pci.c b/lib/env_dpdk/pci.c similarity index 100% rename from lib/env/pci.c rename to lib/env_dpdk/pci.c diff --git a/lib/env/vtophys.c b/lib/env_dpdk/vtophys.c similarity index 100% rename from lib/env/vtophys.c rename to lib/env_dpdk/vtophys.c