From 4f857ce59311154836d33a840605992e8671159c Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Thu, 8 Dec 2022 11:10:03 +0100 Subject: [PATCH] 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 Change-Id: Idd39b5bae888a991d7d628a19bc18acac6570f81 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15819 Reviewed-by: Konrad Sztyber Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot --- scripts/setup.sh | 8 -------- test/common/autotest_common.sh | 11 +---------- test/setup/driver.sh | 13 +------------ 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index ef757642f..a15f2e394 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -160,14 +160,6 @@ function linux_bind_driver() { echo "" > "/sys/bus/pci/devices/$bdf/driver_override" 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" return 1 fi diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 895a7d83c..b563ccb22 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -268,11 +268,6 @@ if [ "$(uname -s)" = "Linux" ]; then MAKE="make" 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 MAKE="gmake" 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 cleanup if [ $(uname -s) = "Linux" ]; then - if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then - [[ -e /sys/module/igb_uio ]] && rmmod igb_uio - else - modprobe -r uio_pci_generic - fi + modprobe -r uio_pci_generic fi rm -rf "$asan_suppression_file" if [[ -n $old_core_pattern ]]; then diff --git a/test/setup/driver.sh b/test/setup/driver.sh index 88f574860..b983afe34 100755 --- a/test/setup/driver.sh +++ b/test/setup/driver.sh @@ -34,22 +34,11 @@ vfio() { return 1 } -igb_uio() { - is_driver igb_uio -} - pick_driver() { if vfio; then echo "vfio-pci" elif uio; then - # Consider special case for broken uio_pci_generic driver - if igb_uio; then - echo "@(uio_pci_generic|igb_uio)" - else - echo "uio_pci_generic" - fi - elif igb_uio; then - echo "igb_uio" + echo "uio_pci_generic" else echo "No valid driver found" fi