Commit 6bd7bd0d authored by Changpeng Liu's avatar Changpeng Liu Committed by Jim Harris
Browse files

vhost: deprecate internal vhost library support



The internal vhost library is used when DPDK's version
is older than 19.05 and the experiemntal vhost nvme
target.

For the CONFIG_INTERNAL_VHOST_LIB option, SPDK doesn't
enable this option by default over one year and CI
doesn't cover it either, so we may remove it with
this release.

As for the vhost-nvme target, since we are developing
a new vfio-user target solution, it's OK for us to remove
it now.

Change-Id: Ib2cce1db99cd09754307c2828b3187f2d4550304
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4562


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent c77c6559
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2,6 +2,12 @@

## v20.10: (Upcoming Release)

### vhost

SPDK has switched to DPDK's rte_vhost library since 19.07 release, removed the internal
rte_vhost library which is used for DPDK older than 19.05, removed the experimental vhost
nvme target which depends on the internal rte_vhost library.

### bdev

A new `spdk_bdev_part_base_construct_ext` function has been added and the
+0 −1
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ CONFIG_RBD=n

# Build vhost library.
CONFIG_VHOST=y
CONFIG_VHOST_INTERNAL_LIB=n

# Build vhost initiator (Virtio) driver.
CONFIG_VIRTIO=y
+0 −3
Original line number Diff line number Diff line
@@ -44,9 +44,6 @@ SPDK_LIB_LIST = $(ALL_MODULES_LIST)
ifeq ($(OS),Linux)
ifeq ($(CONFIG_VHOST),y)
SPDK_LIB_LIST += vhost event_vhost
ifeq ($(CONFIG_VHOST_INTERNAL_LIB),y)
SPDK_LIB_LIST += rte_vhost
endif
endif
endif

+0 −4
Original line number Diff line number Diff line
@@ -42,10 +42,6 @@ C_SRCS := vhost.c
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
SPDK_LIB_LIST += vhost event_vhost

ifeq ($(CONFIG_VHOST_INTERNAL_LIB),y)
SPDK_LIB_LIST += rte_vhost
endif

SPDK_LIB_LIST += $(EVENT_BDEV_SUBSYSTEM) event_net event_scsi event
SPDK_LIB_LIST += jsonrpc json rpc bdev scsi accel trace conf
SPDK_LIB_LIST += thread util log
+6 −22
Original line number Diff line number Diff line
@@ -59,9 +59,6 @@ function usage()
	echo "                           default: /usr/src/fio"
	echo " vhost                     Build vhost target. Enabled by default."
	echo "                           No path required."
	echo " internal-vhost-lib        Use the internal copy of rte_vhost. By default, the upstream"
	echo "                           rte_vhost from DPDK will be used."
	echo "                           No path required."
	echo " virtio                    Build vhost initiator and virtio-pci bdev modules."
	echo "                           No path required."
	echo " pmdk                      Build persistent memory bdev."
@@ -155,7 +152,6 @@ fi
if [[ $sys_name == "FreeBSD" ]]; then
	# Vhost, rte_vhost library and virtio are only supported on Linux.
	CONFIG[VHOST]="n"
	CONFIG[VHOST_INTERNAL_LIB]="n"
	CONFIG[VIRTIO]="n"
	echo "Notice: Vhost, rte_vhost library and virtio are only supported on Linux. Turning off default feature."
fi
@@ -331,12 +327,6 @@ for i in "$@"; do
		--without-vhost)
			CONFIG[VHOST]=n
			;;
		--with-internal-vhost-lib)
			CONFIG[VHOST_INTERNAL_LIB]=y
			;;
		--without-internal-vhost-lib)
			CONFIG[VHOST_INTERNAL_LIB]=n
			;;
		--with-virtio)
			CONFIG[VIRTIO]=y
			;;
@@ -500,18 +490,17 @@ if [ -z "${CONFIG[ENV]}" ]; then
			echo "Using default DPDK in ${CONFIG[DPDK_DIR]}"
		fi

		if [[ "${CONFIG[VHOST]}" = "y" ]] && [[ "${CONFIG[VHOST_INTERNAL_LIB]}" = "n" ]]; then
		if [ "${CONFIG[VHOST]}" = "y" ]; then
			# We lookup "common_linux" file to check if DPDK version is >= 19.05.
			# "common_linux" is available since exactly DPDK 19.05 - it was renamed
			# from "common_linuxapp".
			if [ ! -f "$rootdir"/dpdk/config/common_linux ]; then
				echo "Notice: Using internal, legacy rte_vhost library due to DPDK" \
				     "version < 19.05"
				CONFIG[VHOST_INTERNAL_LIB]=y
				echo "ERROR: Vhost only supports DPDK >= 19.05. Please use newer DPDK or disable vhost library --without-vhost."
				exit 1
			fi
		fi
	else
		if [[ "${CONFIG[VHOST]}" = "y" ]] && [[ "${CONFIG[VHOST_INTERNAL_LIB]}" = "n" ]]; then
		if [ "${CONFIG[VHOST]}" = "y" ]; then
			# DPDK must be already built, so we can simply try to use the new rte_vhost.
			# It has a number of internal dependencies though, so don't try to link the
			# program, just compile it
@@ -519,9 +508,8 @@ if [ -z "${CONFIG[ENV]}" ]; then
				'int main(void) { return rte_vhost_extern_callback_register(0, NULL, NULL); }\n' \
				| ${BUILD_CMD[@]} -c -Wno-deprecated-declarations -Werror \
				-I"${CONFIG[DPDK_DIR]}/include" - &>/dev/null; then
				echo "Notice: DPDK's rte_vhost not found or version < 19.05, using internal," \
				     "legacy rte_vhost library."
				CONFIG[VHOST_INTERNAL_LIB]=y
				echo "ERROR: Vhost only supports DPDK >= 19.05. Please use newer DPDK or disable vhost library --without-vhost."
				exit 1
			fi
		fi
	fi
@@ -568,10 +556,6 @@ if [[ $sys_name == "FreeBSD" ]]; then
		echo "Vhost is only supported on Linux."
		exit 1
	fi
	if [[ "${CONFIG[VHOST_INTERNAL_LIB]}" == "y" ]]; then
		echo "Internal rte_vhost library is only supported on Linux."
		exit 1
	fi
	if [[ "${CONFIG[VIRTIO]}" == "y" ]]; then
		echo "Virtio is only supported on Linux."
		exit 1
Loading