From 8be76f858969651265134f2d580f3611970ae495 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Tue, 23 Jan 2018 15:57:26 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/395946 Reviewed-by: Ben Walker Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp --- scripts/setup.sh | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 62bb3dc6c..16fbfd8e7 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -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 - + configure_linux_pci 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 - + reset_linux_pci 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 - + configure_freebsd_pci 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 + kldunload nic_uio.ko || true } 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