scripts/setup: Stop checking for broken uio_pci_generic driver

This check was put in place as a workaround for some specific kernel
builds which were mainly shipped under centos8. Since we already
dropped centos8 in the CI and replaced it with rocky8 (where kernel
is actually stable) there's no value in maintaining that anymore.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Idd39b5bae888a991d7d628a19bc18acac6570f81
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15819
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Michal Berger 2022-12-08 11:10:03 +01:00 committed by Tomasz Zawadzki
parent eab0c6649d
commit 4f857ce593
3 changed files with 2 additions and 30 deletions

View File

@ -160,14 +160,6 @@ function linux_bind_driver() {
echo "" > "/sys/bus/pci/devices/$bdf/driver_override" echo "" > "/sys/bus/pci/devices/$bdf/driver_override"
if [[ ! -e /sys/bus/pci/drivers/$driver_name/$bdf ]]; then if [[ ! -e /sys/bus/pci/drivers/$driver_name/$bdf ]]; then
if [[ $driver_name == uio_pci_generic ]] && ! check_for_driver igb_uio; then
# uio_pci_generic driver might be broken in some 4.18.x kernels (see
# centos8 for instance) so try to fallback to igb_uio.
pci_dev_echo "$bdf" "uio_pci_generic potentially broken, moving to igb_uio"
drivers_d["$bdf"]="no driver"
linux_bind_driver "$bdf" igb_uio
return
fi
pci_dev_echo "$bdf" "failed to bind to $driver_name, aborting" pci_dev_echo "$bdf" "failed to bind to $driver_name, aborting"
return 1 return 1
fi fi

View File

@ -268,11 +268,6 @@ if [ "$(uname -s)" = "Linux" ]; then
MAKE="make" MAKE="make"
MAKEFLAGS=${MAKEFLAGS:--j$(nproc)} MAKEFLAGS=${MAKEFLAGS:--j$(nproc)}
if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then
export DRIVER_OVERRIDE=igb_uio
# Building kernel modules requires root privileges
MAKE="sudo $MAKE"
fi
elif [ "$(uname -s)" = "FreeBSD" ]; then elif [ "$(uname -s)" = "FreeBSD" ]; then
MAKE="gmake" MAKE="gmake"
MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | grep -E -i 'hw.ncpu' | awk '{print $2}')} MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | grep -E -i 'hw.ncpu' | awk '{print $2}')}
@ -1345,11 +1340,7 @@ function autotest_cleanup() {
$rootdir/scripts/setup.sh reset $rootdir/scripts/setup.sh reset
$rootdir/scripts/setup.sh cleanup $rootdir/scripts/setup.sh cleanup
if [ $(uname -s) = "Linux" ]; then if [ $(uname -s) = "Linux" ]; then
if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then modprobe -r uio_pci_generic
[[ -e /sys/module/igb_uio ]] && rmmod igb_uio
else
modprobe -r uio_pci_generic
fi
fi fi
rm -rf "$asan_suppression_file" rm -rf "$asan_suppression_file"
if [[ -n $old_core_pattern ]]; then if [[ -n $old_core_pattern ]]; then

View File

@ -34,22 +34,11 @@ vfio() {
return 1 return 1
} }
igb_uio() {
is_driver igb_uio
}
pick_driver() { pick_driver() {
if vfio; then if vfio; then
echo "vfio-pci" echo "vfio-pci"
elif uio; then elif uio; then
# Consider special case for broken uio_pci_generic driver echo "uio_pci_generic"
if igb_uio; then
echo "@(uio_pci_generic|igb_uio)"
else
echo "uio_pci_generic"
fi
elif igb_uio; then
echo "igb_uio"
else else
echo "No valid driver found" echo "No valid driver found"
fi fi