Skip to contentSkip to conversation

crypto/qat: add in libcrypto version check

PATCH Superseded Kai Ji 2 participants 6 messages Jul 26, 2022 – Aug 4, 2022 Arm/Amlogic Meson SoC support

lore
Share & tools
lore

Kai Ji

author
#0 lore raw

PATCH 1/1 crypto/qat: add in libcrypto version check

This patch add in libcrypto version check before enable libipsec-mb for QAT. The inter-ipsec-mb lib for partial hash and AES cacluation should only be enabled when both OpensSSL 3.0 and IPSec_MB 1.2.0 are installed on the system.

---
 drivers/common/qat/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/common/qat/meson.build +3 -1
index 245c0fbe61..8247bdd017 100644
@@ -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]
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v2 1/1 crypto/qat: add in libcrypto version check

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.

---
 drivers/common/qat/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/common/qat/meson.build +3 -1
index 245c0fbe61..8247bdd017 100644
@@ -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]
Signature · 1 line
2.17.1
author
#2 lore raw

PATCH v2 1/1 Crypto/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.

---
 drivers/common/qat/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/common/qat/meson.build +3 -1
index 245c0fbe61..8247bdd017 100644
@@ -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]
Signature · 1 line
2.17.1
Acked-by on v2 1/1 Applied
#3 lore raw

RE: [EXT] [dpdk-dev v2] Crypto/qat: fix build with OpenSSL 1.1

Quoted 1 line

Subject: [EXT] [dpdk-dev v2] Crypto/qat: fix build with OpenSSL 1.1

common/qat: fix build with OpenSSL 1.1

Quoted 6 lines

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.

Fixes 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and AES")

Applied to dpdk-next-crypto

Thanks.

#4 lore raw
In reply to Kai Ji

Hi Kai,

This is a fix for compilation when openssl 1.1 is used to build QAT. Can you update the title to
Crypto/qat: fix build with OpenSSL 1.1

Quoted 4 lines

This patch add in libcrypto version check before enable libipsec-mb for QAT. The inter-ipsec-mb lib for partial hash and AES cacluation should only be enabled when both OpensSSL 3.0 and IPSec_MB 1.2.0 are installed on the system.

Spell check on description.

Quoted 24 lines
---
 drivers/common/qat/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/common/qat/meson.build +3 -2
index 245c0fbe61..8247bdd017 100644
@@ -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]
--

2.17.1

author
#5 lore raw

Thanks akhil,

V2 here: http://patchwork.dpdk.org/project/dpdk/patch/[email protected]/

Regards

Kai

Quoted 44 lines

-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Tuesday, July 26, 2022 11:14 AM
To: Ji, Kai <[email protected]>; [email protected]
Cc: Ashwin Sekhar Thalakalath Kottilveetil <[email protected]>; Anoob Joseph <[email protected]>
Subject: RE: [EXT] [dpdk-dev v1] crypto/qat: add in libcrypto version check

Hi Kai,

This is a fix for compilation when openssl 1.1 is used to build QAT. Can you update the title to
Crypto/qat: fix build with OpenSSL 1.1

Quoted 4 lines

This patch add in libcrypto version check before enable libipsec-mb for QAT. The inter-ipsec-mb lib for partial hash and AES cacluation should only be enabled when both OpensSSL 3.0 and IPSec_MB 1.2.0 are installed on the system.

Spell check on description.

Quoted 23 lines
---
 drivers/common/qat/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/common/qat/meson.build index 245c0fbe61..8247bdd017 100644

drivers/common/qat/meson.build +3 -1
@@ -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]
--

2.17.1