Commit 80881761 authored by Karol Latecki's avatar Karol Latecki Committed by Tomasz Zawadzki
Browse files

test/vhost_perf: add option to not run gen_nvme.sh



Do not run gen_nvme.sh and do not automatically create
nvme bdev configuration.
Allows more control over Nvme/bdev configuration when
running performance tests.

Change-Id: I9ef139921efbcc5d92d3a55c05aace929c6284e7
Signed-off-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464564


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarMaciej Wawryk <maciejx.wawryk@intel.com>
parent 7f19b9c6
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -110,13 +110,19 @@ function get_vhost_dir()
function vhost_run()
{
	local vhost_name="$1"
	local run_gen_nvme=true

	if [[ -z "$vhost_name" ]]; then
		error "vhost name must be provided to vhost_run"
		return 1
	fi
	shift

	if [[ "$1" == "--no-gen-nvme" ]]; then
		notice "Skipping gen_nvmf.sh NVMe bdev configuration"
		run_gen_nvme=false
		shift
	fi

	local vhost_dir="$(get_vhost_dir $vhost_name)"
	local vhost_app="$rootdir/app/vhost/vhost"
@@ -147,7 +153,7 @@ function vhost_run()
	notice "waiting for app to run..."
	waitforlisten "$vhost_pid" "$vhost_dir/rpc.sock"
	#do not generate nvmes if pci access is disabled
	if [[ "$cmd" != *"--no-pci"* ]] && [[ "$cmd" != *"-u"* ]]; then
	if [[ "$cmd" != *"--no-pci"* ]] && [[ "$cmd" != *"-u"* ]] && $run_gen_nvme; then
		$rootdir/scripts/gen_nvme.sh "--json" | $rootdir/scripts/rpc.py\
		 -s $vhost_dir/rpc.sock load_subsystem_config
	fi