diff --git a/1000-add-amd-CPU-for-qat_sw.patch b/1000-add-amd-CPU-for-qat_sw.patch new file mode 100644 index 0000000000000000000000000000000000000000..1fa0ae2477a563df9b082a1575ae5924b940f67b --- /dev/null +++ b/1000-add-amd-CPU-for-qat_sw.patch @@ -0,0 +1,40 @@ +From a7094bed784a4a841969f7ca9720aab9a4550014 Mon Sep 17 00:00:00 2001 +From: Guanjun +Date: Wed, 4 Dec 2024 16:06:24 +0800 +Subject: [PATCH] add amd CPU for qat_sw + +Signed-off-by: Guanjun +Signed-off-by: Zelin Deng +--- + e_qat.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/e_qat.c b/e_qat.c +index 0943f9a..41ea7a2 100644 +--- a/e_qat.c ++++ b/e_qat.c +@@ -148,6 +148,9 @@ + # define Genu 0x756e6547 + # define ineI 0x49656e69 + # define ntel 0x6c65746e ++# define Auth 0x68747541 ++# define enti 0x69746e65 ++# define cAMD 0x444d4163 + # define VAES_BIT 9 + # define VPCLMULQDQ_BIT 10 + # define AVX512F_BIT 16 +@@ -546,9 +549,9 @@ int qat_sw_cpu_support(void) + ecx = &info[2]; + edx = &info[3]; + +- /* Is this an Intel CPU? */ ++ /* Is this an Intel or AMD CPU? */ + __cpuid(info, 0x00, 0); +- if (*ebx != Genu || *ecx != ntel || *edx != ineI) ++ if (!(*ebx == Genu && *ecx == ntel && *edx == ineI) && !(*ebx == Auth || *ecx == cAMD || *edx == enti)) + return 0; + + __cpuid(info, 0x07, 0); +-- +2.41.0 + diff --git a/qatengine-1.7.0.tar.gz b/qatengine-1.7.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..bad85e7de57ef426157f03778e0ff33ec178be79 Binary files /dev/null and b/qatengine-1.7.0.tar.gz differ diff --git a/qatengine.spec b/qatengine.spec index 15919ea87a6b87d1d6b01ec06b117016139e04df..1decbd2837c1fcb60efffd196eb29d326ae17497 100644 --- a/qatengine.spec +++ b/qatengine.spec @@ -1,20 +1,33 @@ -%define anolis_release 1 +%define anolis_release 3 %global enginesdir %(pkg-config --variable=enginesdir libcrypto) %global githubname QAT_Engine Name: qatengine -Version: 1.2.0 +Version: 1.7.0 Release: %{anolis_release}%{?dist} Summary: IntelĀ® QuickAssist Technology OpenSSL* Engine(QAT_Engine) -License: BSD and OpenSSL +License: BSD-3-Clause AND OpenSSL URL: https://github.com/intel/%{githubname} -Source0: https://github.com/intel/%{githubname}/archive/v%{version}/v%{version}.tar.gz +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: gcc make pkg-config autoconf automake libtool openssl1.1-devel -BuildRequires: intel-ipp-crypto-mb-devel intel-ipsec-mb-devel intel-QAT20-devel udma-devel +Patch1000: 1000-add-amd-CPU-for-qat_sw.patch ExclusiveArch: x86_64 +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc +BuildRequires: libtool +BuildRequires: openssl-devel >= 3.0.0 +BuildRequires: qatlib-devel >= 23.02.0 +BuildRequires: intel-ipp-crypto-mb-devel >= 1.0.6 +BuildRequires: intel-ipsec-mb-devel >= 1.3.0 +BuildRequires: openssl + +Requires: intel-ipsec-mb +Requires: intel-ipp-crypto-mb +Requires: openssl zlib pcre2 + %description The %{name} provides the Intel QuickAssist Technology OpenSSL Engine (an OpenSSL Plug-In Engine). IntelĀ® QuickAssist Technology OpenSSL* Engine @@ -24,7 +37,7 @@ software based on vectorized instructions. This change starting with the options to accelerate their workloads. The QAT OpenSSL* engine now supports the ability to accelerate from the stand OpenSSL* to basic Intel instruction set, to either Hardware acceleration path (via the qat_hw path) or via the -optimized SW path (qat_sw lib). +optimized SW path (qat_sw lib). %package doc Summary: Documentation files for %{name} @@ -35,15 +48,21 @@ BuildArch: noarch The %{name}-doc package contains documentation files for %{name}. %prep -%autosetup -n %{githubname}-%{version} -p1 +%autosetup -n QAT_Engine-%{version} %build -%configure --with-qat_hw_dir=/usr/include/qat --enable-qat_sw +autoreconf -ivf +%configure --enable-qat_sw %make_build %install %make_install +find %{buildroot} -name "*.la" -delete + +%check +export OPENSSL_ENGINES=%{buildroot}%{enginesdir} + %files %license LICENSE* %{enginesdir}/%{name}.so @@ -52,6 +71,15 @@ The %{name}-doc package contains documentation files for %{name}. %doc README.md docs* %changelog +* Wed Dec 04 2024 Zelin Deng - 1.7.0 +- Update package to 1.7.0 + +* Tue Jul 23 2024 Guanjun - 1.2.0-3 +- Override the pkg-config settings and forcibly utilize OpenSSL 3.x versions during the compilation process + +* Wed May 22 2024 Guanjun - 1.2.0-2 +- Add amd CPU for qat_sw + * Wed Aug 16 2023 Guanjun - 1.2.0-1 - Add build requires intel-QAT20-devel - enable qat_hw and qat_sw diff --git a/v1.2.0.tar.gz b/v1.2.0.tar.gz deleted file mode 100644 index e592460765026190a3b9c247320a325d858be4ba..0000000000000000000000000000000000000000 Binary files a/v1.2.0.tar.gz and /dev/null differ