Compare commits

...

10 Commits

Author SHA1 Message Date
Daniel Verkamp
9f8ad70cb1 SPDK 17.07.1
Change-Id: Ibf2672cc2e4f5afb5cc6e849a446eba15ca669f7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378206
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-13 16:17:01 -04:00
Daniel Verkamp
3c74ca51bc env_dpdk: use detected include file path
env.mk already detects the location of the include path (which may or
may not have 'dpdk' in the name depending on the DPDK version), so put
that into a DPDK_INC_DIR variable and use it in the libnuma check so we
find the correct rte_config.h location.

Also check if rte_config.h exists before trying to pass it to grep -
this prevents error messages when running 'make clean' using the dpdk
submodule, because the rte_config.h file is removed before the other
SPDK directories get a chance to run 'make clean'.

Change-Id: I903c9f5801c04302407b2217723466cd6883fbda
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378172
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-12 16:43:31 -04:00
Ziye Yang
cde765e175 vhost, unit: fix DPDK include issue in Makefile.
According to the env.mk, DPDK include file can be
passed by user, so we need to use DPDK_INC to
avoid the compilation issue.

Change-Id: I0b60dc67a001d7d7a25d0c752c46a79b37e7bee5
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/377965
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-12 16:03:28 -04:00
Daniel Verkamp
e42239f7e9 changelog: add v17.07.1 section
Change-Id: I890ef779ee96e7ec47d098ac254a8a927d6a782d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378173
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-12 15:51:57 -04:00
Daniel Verkamp
4a8afc9269 env_dpdk: link libnuma when necessary
Change-Id: I9ebd9eb846bd0d2fdbfe6fcd33ba455f099f8a9b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377632
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-11 12:46:45 -04:00
Daniel Verkamp
50b4e54fd5 rte_vhost: fix numa_realloc() copy size
The rte_malloc_socket() call just above that allocates vq is only
allocating sizeof(*vq), but the memcpy() would have tried to copy
sizeof(*vq) * 2.

This code is under #ifdef RTE_LIBRTE_VHOST_NUMA, so it was not normally
enabled with DPDK 17.05, but it breaks when DPDK 17.08 turns on libnuma
support by default.

Change-Id: I020eb610d7e94c3346c25957722f4d9f1ecd370f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377631
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-11 12:46:45 -04:00
Daniel Verkamp
4d1908e004 rte_vhost: include rte_config.h via compiler option
Some rte_vhost files use #ifdef RTE_LIBRTE_VHOST_NUMA, but they don't
explicitly include rte_config.h, which defines this macro.  Instruct
the compiler to pre-include rte_config.h in the same way DPDK's build
system does.

Change-Id: I3b8b37c18b1561e8825bde6272731e5d3eff851e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377630
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-11 12:46:45 -04:00
Daniel Verkamp
a1fa3aea6c test/bdev: remove partition table after GPT test
Make sure later tests don't fail due to a GPT partition table created on
an NVMe device.

Change-Id: Ic4560562c462723c9bce420d735716ed579ebb29
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377835
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-11 12:46:45 -04:00
Daniel Verkamp
0e6572ef76 test/rocksdb: disable RocksDB tests on v17.07.x
The SPDK RocksDB env has been changed in an incompatible way on master,
so the test pool fails to build the v17.07 branch with the updated
RocksDB.

This should be resolved in a better way in the future (maybe by tracking
separate RocksDB versions per SPDK release like we do with the DPDK
submodule), but for now, disable the RocksDB tests on the v17.07.x
maintenance branch so the rest of the tests can continue.

Change-Id: I8486f5bf073fed7b7e748f4275ca0339e9533f84
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377834
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-11 12:46:45 -04:00
Daniel Verkamp
e8cd923fe5 Create v17.07.x maint branch and bump version
Change-Id: I76c82ab2dd2e23fb7bbc092ce43b9224ea751b01
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-08-11 13:32:08 -07:00
9 changed files with 37 additions and 10 deletions

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
## v17.07.1: DPDK 17.08 compatibility
The `env_dpdk` environment layer has been updated to build against DPDK 17.08.
## v17.07: Build system improvements, userspace vhost-blk target, and GPT bdev ## v17.07: Build system improvements, userspace vhost-blk target, and GPT bdev
### Build System ### Build System

View File

@ -113,7 +113,8 @@ if [ $SPDK_TEST_ISCSI -eq 1 ]; then
fi fi
if [ $SPDK_TEST_BLOBFS -eq 1 ]; then if [ $SPDK_TEST_BLOBFS -eq 1 ]; then
run_test ./test/blobfs/rocksdb/rocksdb.sh # NOTE: disabled on v17.07.x branch due to incompatible RocksDB env changes
false && run_test ./test/blobfs/rocksdb/rocksdb.sh
fi fi
if [ $SPDK_TEST_NVMF -eq 1 ]; then if [ $SPDK_TEST_NVMF -eq 1 ]; then

View File

@ -54,7 +54,7 @@
* Patch level is incremented on maintenance branch releases and reset to 0 for each * Patch level is incremented on maintenance branch releases and reset to 0 for each
* new major.minor release. * new major.minor release.
*/ */
#define SPDK_VERSION_PATCH 0 #define SPDK_VERSION_PATCH 1
/** /**
* Version string suffix. * Version string suffix.

View File

@ -50,10 +50,11 @@ export DPDK_ABS_DIR = $(abspath $(DPDK_DIR))
endif endif
ifneq (, $(wildcard $(DPDK_ABS_DIR)/include/rte_config.h)) ifneq (, $(wildcard $(DPDK_ABS_DIR)/include/rte_config.h))
DPDK_INC = -I$(DPDK_ABS_DIR)/include DPDK_INC_DIR := $(DPDK_ABS_DIR)/include
else else
DPDK_INC = -I$(DPDK_ABS_DIR)/include/dpdk DPDK_INC_DIR := $(DPDK_ABS_DIR)/include/dpdk
endif endif
DPDK_INC := -I$(DPDK_INC_DIR)
ifneq (, $(wildcard $(DPDK_ABS_DIR)/lib/librte_eal.a)) ifneq (, $(wildcard $(DPDK_ABS_DIR)/lib/librte_eal.a))
DPDK_LIB_EXT = .a DPDK_LIB_EXT = .a
@ -83,6 +84,12 @@ ENV_DPDK_FILE = $(call spdk_lib_list_to_files,env_dpdk)
ENV_LIBS = $(ENV_DPDK_FILE) $(DPDK_LIB) ENV_LIBS = $(ENV_DPDK_FILE) $(DPDK_LIB)
ENV_LINKER_ARGS = $(ENV_DPDK_FILE) -Wl,--start-group -Wl,--whole-archive $(DPDK_LIB) -Wl,--end-group -Wl,--no-whole-archive ENV_LINKER_ARGS = $(ENV_DPDK_FILE) -Wl,--start-group -Wl,--whole-archive $(DPDK_LIB) -Wl,--end-group -Wl,--no-whole-archive
ifneq (,$(wildcard $(DPDK_INC_DIR)/rte_config.h))
ifneq (,$(shell grep "define RTE_LIBRTE_VHOST_NUMA 1" $(DPDK_INC_DIR)/rte_config.h))
ENV_LINKER_ARGS += -lnuma
endif
endif
ifeq ($(OS),Linux) ifeq ($(OS),Linux)
ENV_LINKER_ARGS += -ldl ENV_LINKER_ARGS += -ldl
endif endif

View File

@ -36,6 +36,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
CFLAGS += -I. CFLAGS += -I.
CFLAGS += $(ENV_CFLAGS) CFLAGS += $(ENV_CFLAGS)
CFLAGS += -include rte_config.h
# These are the DPDK vhost files copied (for now) into SPDK # These are the DPDK vhost files copied (for now) into SPDK
C_SRCS += fd_man.c socket.c vhost_user.c vhost.c C_SRCS += fd_man.c socket.c vhost_user.c vhost.c

View File

@ -275,7 +275,7 @@ numa_realloc(struct virtio_net *dev, int index)
if (!vq) if (!vq)
return dev; return dev;
memcpy(vq, old_vq, sizeof(*vq) * VIRTIO_QNUM); memcpy(vq, old_vq, sizeof(*vq));
rte_free(old_vq); rte_free(old_vq);
} }

View File

@ -315,11 +315,16 @@ function part_dev_by_gpt () {
conf=$1 conf=$1
devname=$2 devname=$2
rootdir=$3 rootdir=$3
operation=$4
if [ ! -e $conf ]; then if [ ! -e $conf ]; then
return 1 return 1
fi fi
if [ -z "$operation" ]; then
operation="create"
fi
cp $conf ${conf}.gpt cp $conf ${conf}.gpt
echo "[Gpt]" >> ${conf}.gpt echo "[Gpt]" >> ${conf}.gpt
echo " Disable Yes" >> ${conf}.gpt echo " Disable Yes" >> ${conf}.gpt
@ -332,10 +337,15 @@ function part_dev_by_gpt () {
waitforbdev $devname "python $rootdir/scripts/rpc.py" waitforbdev $devname "python $rootdir/scripts/rpc.py"
if [ -e /dev/nbd0 ]; then if [ -e /dev/nbd0 ]; then
if [ "$operation" = create ]; then
parted -s /dev/nbd0 mklabel gpt mkpart first '0%' '50%' mkpart second '50%' '100%' parted -s /dev/nbd0 mklabel gpt mkpart first '0%' '50%' mkpart second '50%' '100%'
# change the GUID to SPDK GUID value # change the GUID to SPDK GUID value
sgdisk -t 1:$SPDK_GPT_GUID /dev/nbd0 sgdisk -t 1:$SPDK_GPT_GUID /dev/nbd0
sgdisk -t 2:$SPDK_GPT_GUID /dev/nbd0 sgdisk -t 2:$SPDK_GPT_GUID /dev/nbd0
elif [ "$operation" = reset ]; then
# clear the partition table
dd if=/dev/zero of=/dev/nbd0 bs=4096 count=8 oflag=direct
fi
fi fi
killprocess $nbd_pid killprocess $nbd_pid
rm -f ${conf}.gpt rm -f ${conf}.gpt

View File

@ -42,5 +42,9 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
timing_exit unmap timing_exit unmap
fi fi
if grep -q Nvme0 $testdir/bdev.conf; then
part_dev_by_gpt $testdir/bdev.conf Nvme0n1 $rootdir reset
fi
rm -f $testdir/bdev.conf rm -f $testdir/bdev.conf
timing_exit blockdev timing_exit blockdev

View File

@ -40,7 +40,7 @@ SPDK_LIB_LIST = log
CFLAGS += -I$(SPDK_ROOT_DIR)/test CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost/rte_vhost CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost/rte_vhost
CFLAGS += -I$(DPDK_DIR)/include CFLAGS += $(ENV_CFLAGS)
LIBS += $(SPDK_LIB_LINKER_ARGS) LIBS += $(SPDK_LIB_LINKER_ARGS)
LIBS += -lcunit LIBS += -lcunit