Commit 8be76f85 authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Jim Harris
Browse files

setup.sh: hide SKIP_PCI from public help



Instead, PCI_WHITELIST="none" can now be used.
SKIP_PCI continues to work, but is undocumented.

Change-Id: Id4a7959716f6bca92be0da761258c84f32aca8b5
Signed-off-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/395946


Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 2a68832d
Loading
Loading
Loading
Loading
+8 −18
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ function usage()
	echo "                  To blacklist all PCI devices use a non-valid address."
	echo "                  E.g. PCI_WHITELIST=\"none\""
	echo "                  If empty or unset, all PCI devices will be bound."
	echo "SKIP_PCI          Setting this variable to non-zero value will skip all PCI operations."
	echo "TARGET_USER       User that will own hugepage mountpoint directory and vfio groups."
	echo "                  By default the current user will be used."
	exit 0
@@ -221,10 +220,7 @@ function configure_linux_pci {
}

function configure_linux {
	if [ "$SKIP_PCI" == 0 ]; then
	configure_linux_pci
	fi

	hugetlbfs_mounts=$(linux_hugetlbfs_mounts)

	if [ -z "$hugetlbfs_mounts" ]; then
@@ -347,10 +343,7 @@ function reset_linux_pci {
}

function reset_linux {
	if [ "$SKIP_PCI" == 0 ]; then
	reset_linux_pci
	fi

	for mount in $(linux_hugetlbfs_mounts); do
		rm -f "$mount"/spdk*map_*
	done
@@ -428,10 +421,7 @@ function configure_freebsd_pci {
}

function configure_freebsd {
	if [ "$SKIP_PCI" == 0 ]; then
	configure_freebsd_pci
	fi

	kldunload contigmem.ko || true
	kenv hw.contigmem.num_buffers=$((HUGEMEM / 256))
	kenv hw.contigmem.buffer_size=$((256 * 1024 * 1024))
@@ -440,10 +430,7 @@ function configure_freebsd {

function reset_freebsd {
	kldunload contigmem.ko || true

	if [ "$SKIP_PCI" == 0 ]; then
	kldunload nic_uio.ko || true
	fi
}

mode=$1
@@ -453,13 +440,16 @@ if [ -z "$mode" ]; then
fi

: ${HUGEMEM:=2048}
: ${SKIP_PCI:=0}
: ${PCI_WHITELIST:=""}

if [ -n "$NVME_WHITELIST" ]; then
	PCI_WHITELIST="$PCI_WHITELIST $NVME_WHITELIST"
fi

if [ -n "$SKIP_PCI" ]; then
	PCI_WHITELIST="none"
fi

declare -a PCI_WHITELIST=(${PCI_WHITELIST})

if [ -z "$TARGET_USER" ]; then