From 5121b9a2fd8d9171bbd64be2f68b6800d17aebe3 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Mon, 14 Nov 2022 09:15:36 +0100 Subject: [PATCH] scripts/qat_setup: Remove VFs' pci id from the target bind driver Do this before the attempt to bind these devices is made. This is to make sure script works on subsequent runs. Scripts itself executes the qat_service which disables potential VFs of the target PF. In case VFs were previously bound to one of the uio drivers (via new_id) the next write to that attr will fail not rebinding the devices again. To avoid that, remove the VFs' id first and then attempt to bind them to the uio driver. Signed-off-by: Michal Berger Change-Id: I4818a2e3e663a4136084ce4bbb85ccfcfde1ae42 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15427 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- scripts/qat_setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/qat_setup.sh b/scripts/qat_setup.sh index b8b17d890..3250e5ef8 100755 --- a/scripts/qat_setup.sh +++ b/scripts/qat_setup.sh @@ -136,6 +136,7 @@ else exit 1 fi +echo -n "8086 37c9" > /sys/bus/pci/drivers/$driver_to_bind/remove_id 2> /dev/null echo -n "8086 37c9" > /sys/bus/pci/drivers/$driver_to_bind/new_id for vf in "${qat_vf_bdfs[@]}"; do if ! ls -l /sys/bus/pci/devices/$vf/driver | grep -q $driver_to_bind; then