Commit 7bd3c9e5 authored by Michal Berger's avatar Michal Berger Committed by Konrad Sztyber
Browse files

pkgdep/git: Handle changes in crypto/algapi.h under ubuntu's kernels

The following change:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c35e03eaec



got introduced in kernel's >= 6.3.x, however, ubuntu provides a diff
which backports it into its 5.15 builds which are available for the
22.04 LTS release. Since QAT's build infra is not aware of this
have a designated patch which simply removes the extra definition
while building the driver under said kernel versions.

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


Reviewed-by: default avatarTomasz Zawadzki <tomasz@tzawadzki.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent 4d8ce959
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -34,6 +34,10 @@ function install_qat() {
	patch --dir="$GIT_REPOS/QAT" -p1 \
		< "$rootdir/test/common/config/pkgdep/patches/qat/0001-empty-body.patch"

	if [[ $ID == ubuntu ]] && ge "$kernel_ver" 5.15.0-118 && lt "$kernel_ver" 6.3; then
		patch --dir="$GIT_REPOS/QAT" -p1
	fi < "$rootdir/test/common/config/pkgdep/patches/qat/0001-ubuntu-algapi.patch"

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

	if ! sudo service qat_service start; then
+27 −0
Original line number Diff line number Diff line
Ubuntu provides a diff for 5.15.x kernels which adds crypto_request_complete()
to algapi.h. Originally this functionality was merged into >= 6.3 kernels.
---
 quickassist/qat/compat/qat_compat.h | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/quickassist/qat/compat/qat_compat.h b/quickassist/qat/compat/qat_compat.h
index 2c3d9cb..c94345a 100644
--- a/quickassist/qat/compat/qat_compat.h
+++ b/quickassist/qat/compat/qat_compat.h
@@ -510,14 +510,6 @@ static inline void pci_ignore_hotplug(struct pci_dev *dev)
 void kfree_sensitive(const void *p);
 #endif
 
-#if (KERNEL_VERSION(6, 3, 0) > LINUX_VERSION_CODE)
-static inline void crypto_request_complete(struct crypto_async_request *req,
-					   int err)
-{
-	req->complete(req, err);
-}
-#endif
-
 #if (KERNEL_VERSION(6, 6, 0) <= LINUX_VERSION_CODE)
 
 #define PCI_EXP_AER_FLAGS (PCI_EXP_DEVCTL_CERE | PCI_EXP_DEVCTL_NFERE | \
--