Commit 2f6afea6 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

scripts/qat_setup: Be more verbose about SR-IOV setup



If the sriov_numvfs sysfs attr is not available for given controller
report that. Also, verify if number of VFs matches initial value
of 16 devices. If not, report that as well. This number was also
being overwritten with the set value from previous device - this
could false-positive the confirm check so keep the set value in
a seperate variable.

Change-Id: I518464518dd75585c4692c8ec1b3268e798dcf6c
Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5414


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
parent 632703f6
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -41,9 +41,17 @@ fi

# configure virtual functions for the QAT cards.
for qat_bdf in "${qat_pci_bdfs[@]}"; do
	if [[ ! -e /sys/bus/pci/drivers/c6xx/$qat_bdf/sriov_numvfs ]]; then
		echo "($qat_bdf) sriov_numvfs interface missing, is SR-IOV enabled?"
		continue
	fi
	echo "$num_vfs" > /sys/bus/pci/drivers/c6xx/$qat_bdf/sriov_numvfs
	num_vfs=$(cat /sys/bus/pci/drivers/c6xx/$qat_bdf/sriov_numvfs)
	num_vfs_set=$(cat /sys/bus/pci/drivers/c6xx/$qat_bdf/sriov_numvfs)
	if ((num_vfs != num_vfs_set)); then
		echo "Number of VFs set to $num_vfs_set, expected $num_vfs"
	else
		echo "$qat_bdf set to $num_vfs VFs"
	fi
done

# Confirm we have all of the virtual functions we asked for.