setup: add the SKIP_PCI parameter in setup.sh
User may only want to configure hugepage and no configure on the PCI devices. Add the SKIP_PCI parameter to offer this option. If user only wants to configure hugepage, can run: SKIP_PCI=1 ./scripts/setup.sh The default behavior is that PCI devices will be configured. Change-Id: I8302efd5a09f2885e00fa8ed00d398219c11dde7 Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.gerrithub.io/389473 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
55ac2263af
commit
d9174e1e42
@ -131,7 +131,9 @@ function configure_linux_pci {
|
||||
}
|
||||
|
||||
function configure_linux {
|
||||
configure_linux_pci
|
||||
if [ "$SKIP_PCI" == 0 ]; then
|
||||
configure_linux_pci
|
||||
fi
|
||||
|
||||
hugetlbfs_mount=$(linux_hugetlbfs_mount)
|
||||
|
||||
@ -241,7 +243,9 @@ function reset_linux_pci {
|
||||
}
|
||||
|
||||
function reset_linux {
|
||||
reset_linux_pci
|
||||
if [ "$SKIP_PCI" == 0 ]; then
|
||||
reset_linux_pci
|
||||
fi
|
||||
|
||||
hugetlbfs_mount=$(linux_hugetlbfs_mount)
|
||||
rm -f "$hugetlbfs_mount"/spdk*map_*
|
||||
@ -317,7 +321,9 @@ function configure_freebsd_pci {
|
||||
}
|
||||
|
||||
function configure_freebsd {
|
||||
configure_freebsd_pci
|
||||
if [ "$SKIP_PCI" == 0 ]; then
|
||||
configure_freebsd_pci
|
||||
fi
|
||||
|
||||
kldunload contigmem.ko || true
|
||||
kenv hw.contigmem.num_buffers=$((HUGEMEM / 256))
|
||||
@ -327,7 +333,10 @@ function configure_freebsd {
|
||||
|
||||
function reset_freebsd {
|
||||
kldunload contigmem.ko || true
|
||||
kldunload nic_uio.ko || true
|
||||
|
||||
if [ "$SKIP_PCI" == 0 ]; then
|
||||
kldunload nic_uio.ko || true
|
||||
fi
|
||||
}
|
||||
|
||||
username=$1
|
||||
@ -350,6 +359,7 @@ if [ "$username" = "" ]; then
|
||||
fi
|
||||
|
||||
: ${HUGEMEM:=2048}
|
||||
: ${SKIP_PCI:=0}
|
||||
|
||||
if [ `uname` = Linux ]; then
|
||||
HUGEPGSZ=$(( `grep Hugepagesize /proc/meminfo | cut -d : -f 2 | tr -dc '0-9'` ))
|
||||
|
Loading…
x
Reference in New Issue
Block a user