Commit 95406c93 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

pkgdep/git: [QAT] Do the patching only on the tested driver



Make sure that we patch only a specific version of the driver that
we know works with given patches.

Check if $DRIVER_LOCATION_QAT looks like something we know and
proceed with patching if it does.

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


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarMaciej Wawryk <maciejx.wawryk@intel.com>
parent f61b3fdd
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -93,13 +93,15 @@ function install_qat() {

	# Patch use of hidden types in kernels >= 5.6.3. See .patch for details
	if ((kernel_ver >= 0x050603)); then
		patch --dir="$GIT_REPOS/QAT" -p1 < "$rootdir/test/common/config/pkgdep/patches/qat/0001-timespec.patch"
	fi
		# Patch only the driver version that was tested
		[[ ${DRIVER_LOCATION_QAT##*/} == qat1.7.l.4.9.0-00008.tar.gz ]] && patch --dir="$GIT_REPOS/QAT" -p1
	fi < "$rootdir/test/common/config/pkgdep/patches/qat/0001-timespec.patch"

	# Patch name of the pci_aer function which was renamed in kernels >= 5.7.1. See .patch for details
	if ((kernel_ver >= 0x050701)); then
		patch --dir="$GIT_REPOS/QAT" -p1 < "$rootdir/test/common/config/pkgdep/patches/qat/0001-pci_aer.patch"
	fi
		# Patch only the driver version that was tested
		[[ ${DRIVER_LOCATION_QAT##*/} == qat1.7.l.4.9.0-00008.tar.gz ]] && patch --dir="$GIT_REPOS/QAT" -p1
	fi < "$rootdir/test/common/config/pkgdep/patches/qat/0001-pci_aer.patch"

	(cd "$GIT_REPOS/QAT" && sudo ./configure --enable-icp-sriov=host && sudo make install)