From 7493be1302271d24e2aa7d828cdffe33ae286a58 Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Mon, 11 Apr 2022 11:52:05 +0200 Subject: [PATCH] pkgdep/git: update QAT driver Update QAT driver to latest version to enable building the driver on gcc 12 / Fedora 36. Yasm is needed for build process. Change-Id: Ib133f22d0ee2bea5a82b6e7b0bfe408fa1523ce1 Signed-off-by: Karol Latecki Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12231 Community-CI: Broadcom CI Reviewed-by: Pawel Piatek Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris Reviewed-by: Ben Walker Tested-by: SPDK CI Jenkins --- test/common/config/pkgdep/git | 49 ++++---------------------------- test/common/config/vm_setup.conf | 2 +- 2 files changed, 6 insertions(+), 45 deletions(-) diff --git a/test/common/config/pkgdep/git b/test/common/config/pkgdep/git index cba985ba3..c553da229 100644 --- a/test/common/config/pkgdep/git +++ b/test/common/config/pkgdep/git @@ -106,6 +106,10 @@ function install_qat() { local kernel_maj kernel_min kernel_rel kernel_loc local kernel_ver + if ! hash yasm; then + install yasm + fi + in_syms() { local syms if [[ -e /proc/kallsyms ]]; then @@ -133,49 +137,6 @@ function install_qat() { tar -C "$GIT_REPOS/QAT" -xzof - < <(wget -O- "$DRIVER_LOCATION_QAT") - # Patch use of hidden types in kernels >= 5.6.3. See .patch for details - if ((kernel_ver >= 0x050603)); then - # 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)) || ! in_syms pci_cleanup_aer_uncorrect_error_status; then - # Patch only the driver version that was tested - if [[ ${DRIVER_LOCATION_QAT##*/} == qat1.7.l.4.9.0-00008.tar.gz ]]; then - patch --dir="$GIT_REPOS/QAT" -p1 - fi < "$rootdir/test/common/config/pkgdep/patches/qat/0001-pci_aer.patch" - if ((kernel_ver < 0x050701)); then - # Older kernel build without pci_cleanup_aer_uncorrect_error_status()? This might be - # centos8's build. - if [[ ${DRIVER_LOCATION_QAT##*/} == qat1.7.l.4.12.0-00011.tar.gz ]]; then - patch --dir="$GIT_REPOS/QAT" -p1 - fi < "$rootdir/test/common/config/pkgdep/patches/qat/0001-pci_aer_centos.patch" - fi - fi - - # Patch use of cryptohash.h which was removed in favor of crypto/sha.h in kernels >= 5.8. See .patch for details - if ((kernel_ver >= 0x050800)); then - # 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-cryptohash.patch" - - # Object files need to be passed via obj-m otherwise they won't be built with kernels >= 5.10 - if ((kernel_ver >= 0x050a01)); then - patch --dir="$GIT_REPOS/QAT" -p1 - fi < "$rootdir/test/common/config/pkgdep/patches/qat/0001-set-obj-m.patch" - - # sha.h was split into two separate files, sha1.h and sha2.h in kernels >= 5.11 - if ((kernel_ver >= 0x050b01)); then - # qat_algs_ablkcipher.c doesn't exist in older versions of the driver so simply force the patch - patch --force --dir="$GIT_REPOS/QAT" -p1 - fi < "$rootdir/test/common/config/pkgdep/patches/qat/0001-sha.patch" || : - - # cipher routines were moved from crypto.h to crypto/internal/cipher.h in kernels >= 5.12 - if ((kernel_ver >= 0x050c00)); then - patch --dir="$GIT_REPOS/QAT" -p1 - fi < "$rootdir/test/common/config/pkgdep/patches/qat/0001-cipher-ns.patch" - (cd "$GIT_REPOS/QAT" && sudo ./configure --enable-icp-sriov=host && sudo make install) if ! sudo service qat_service start; then @@ -580,7 +541,7 @@ export GIT_REPO_QEMU_VFIO export GIT_REPO_LIBISCSI : ${GIT_REPO_INTEL_IPSEC_MB=https://github.com/spdk/intel-ipsec-mb.git} export GIT_REPO_INTEL_IPSEC_MB -: ${DRIVER_LOCATION_QAT=https://01.org/sites/default/files/downloads//qat1.7.l.4.12.0-00011.tar.gz} +: ${DRIVER_LOCATION_QAT=https://downloadmirror.intel.com/729932/QAT.L.4.18.0-00008.tar.gz} export DRIVER_LOCATION_QAT : ${GIT_REPO_GIT=https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz} export GIT_REPO_GIT diff --git a/test/common/config/vm_setup.conf b/test/common/config/vm_setup.conf index 227c5cdf5..8827cdb12 100644 --- a/test/common/config/vm_setup.conf +++ b/test/common/config/vm_setup.conf @@ -7,4 +7,4 @@ GIT_REPO_FIO=http://git.kernel.dk/fio.git GIT_REPO_FLAMEGRAPH=https://github.com/brendangregg/FlameGraph.git GIT_REPO_QEMU=https://github.com/spdk/qemu GIT_REPO_LIBISCSI=https://github.com/sahlberg/libiscsi -DRIVER_LOCATION_QAT=https://01.org/sites/default/files/downloads/intelr-quickassist-technology/qat1.7.l.4.3.0-00033.tar.gz +DRIVER_LOCATION_QAT=https://downloadmirror.intel.com/729932/QAT.L.4.18.0-00008.tar.gz