[v2] Crypto/qat: fix build with OpenSSL 1.1

Message ID 20220726115608.84140-1-kai.ji@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [v2] Crypto/qat: fix build with OpenSSL 1.1 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS

Commit Message

Ji, Kai July 26, 2022, 11:56 a.m. UTC
  This patch add in libcrypto version check before enable libipsec-mb for
QAT. The inter-ipsec-mb lib for partial hash and AES calculation should
only be enabled when both OpensSSL 3.0 and IPSec_MB 1.2.0 are installed
on the system.

Signed-off-by: Kai Ji <kai.ji@intel.com>
---
 drivers/common/qat/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Akhil Goyal Aug. 4, 2022, 1:09 p.m. UTC | #1
> Subject: [EXT] [dpdk-dev v2] Crypto/qat: fix build with OpenSSL 1.1
common/qat: fix build with OpenSSL 1.1

> This patch add in libcrypto version check before enable libipsec-mb for
> QAT. The inter-ipsec-mb lib for partial hash and AES calculation should
> only be enabled when both OpensSSL 3.0 and IPSec_MB 1.2.0 are installed
> on the system.
> 
> Signed-off-by: Kai Ji <kai.ji@intel.com>
    Fixes: 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and AES")
    Cc: stable@dpdk.org

Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
index 245c0fbe61..8247bdd017 100644
--- a/drivers/common/qat/meson.build
+++ b/drivers/common/qat/meson.build
@@ -37,7 +37,9 @@  endif
 
 IMB_required_ver = '1.2.0'
 libipsecmb = cc.find_library('IPSec_MB', required: false)
-if libipsecmb.found()
+libcrypto_3 = dependency('libcrypto', required: false,
+    method: 'pkg-config', version : '>=3.0.0')
+if libipsecmb.found() and libcrypto_3.found()
     # version comes with quotes, so we split based on " and take the middle
     imb_ver = cc.get_define('IMB_VERSION_STR',
         prefix : '#include<intel-ipsec-mb.h>').split('"')[1]