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: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/395946
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Dariusz Stojaczyk 2018-01-23 15:57:26 +01:00 committed by Jim Harris
parent 2a68832d5c
commit 8be76f8589

View File

@ -44,7 +44,6 @@ function usage()
echo " To blacklist all PCI devices use a non-valid address." echo " To blacklist all PCI devices use a non-valid address."
echo " E.g. PCI_WHITELIST=\"none\"" echo " E.g. PCI_WHITELIST=\"none\""
echo " If empty or unset, all PCI devices will be bound." 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 "TARGET_USER User that will own hugepage mountpoint directory and vfio groups."
echo " By default the current user will be used." echo " By default the current user will be used."
exit 0 exit 0
@ -221,10 +220,7 @@ function configure_linux_pci {
} }
function configure_linux { function configure_linux {
if [ "$SKIP_PCI" == 0 ]; then configure_linux_pci
configure_linux_pci
fi
hugetlbfs_mounts=$(linux_hugetlbfs_mounts) hugetlbfs_mounts=$(linux_hugetlbfs_mounts)
if [ -z "$hugetlbfs_mounts" ]; then if [ -z "$hugetlbfs_mounts" ]; then
@ -347,10 +343,7 @@ function reset_linux_pci {
} }
function reset_linux { function reset_linux {
if [ "$SKIP_PCI" == 0 ]; then reset_linux_pci
reset_linux_pci
fi
for mount in $(linux_hugetlbfs_mounts); do for mount in $(linux_hugetlbfs_mounts); do
rm -f "$mount"/spdk*map_* rm -f "$mount"/spdk*map_*
done done
@ -428,10 +421,7 @@ function configure_freebsd_pci {
} }
function configure_freebsd { function configure_freebsd {
if [ "$SKIP_PCI" == 0 ]; then configure_freebsd_pci
configure_freebsd_pci
fi
kldunload contigmem.ko || true kldunload contigmem.ko || true
kenv hw.contigmem.num_buffers=$((HUGEMEM / 256)) kenv hw.contigmem.num_buffers=$((HUGEMEM / 256))
kenv hw.contigmem.buffer_size=$((256 * 1024 * 1024)) kenv hw.contigmem.buffer_size=$((256 * 1024 * 1024))
@ -440,10 +430,7 @@ function configure_freebsd {
function reset_freebsd { function reset_freebsd {
kldunload contigmem.ko || true kldunload contigmem.ko || true
kldunload nic_uio.ko || true
if [ "$SKIP_PCI" == 0 ]; then
kldunload nic_uio.ko || true
fi
} }
mode=$1 mode=$1
@ -453,13 +440,16 @@ if [ -z "$mode" ]; then
fi fi
: ${HUGEMEM:=2048} : ${HUGEMEM:=2048}
: ${SKIP_PCI:=0}
: ${PCI_WHITELIST:=""} : ${PCI_WHITELIST:=""}
if [ -n "$NVME_WHITELIST" ]; then if [ -n "$NVME_WHITELIST" ]; then
PCI_WHITELIST="$PCI_WHITELIST $NVME_WHITELIST" PCI_WHITELIST="$PCI_WHITELIST $NVME_WHITELIST"
fi fi
if [ -n "$SKIP_PCI" ]; then
PCI_WHITELIST="none"
fi
declare -a PCI_WHITELIST=(${PCI_WHITELIST}) declare -a PCI_WHITELIST=(${PCI_WHITELIST})
if [ -z "$TARGET_USER" ]; then if [ -z "$TARGET_USER" ]; then