Skip to contentSkip to conversation

crypto/qat: require IPsec MB for HMAC precomputes

PATCH Superseded Emma Finn 3 participants 7 messages Jun 11 – Jun 30

Subsystems (2)
lore
Share & tools
lore

Emma Finn

author
#0 lore raw

PATCH 1/1 crypto/qat: require IPsec MB for HMAC precomputes

IPsec MB library (v1.4.0+) is now required for HMAC precomputes as OpenSSL 3.0 removed SHA*_Transform APIs. OpenSSL remains optional for DOCSIS BPI cipher fallback via EVP API.

On x86: IPsec MB required, OpenSSL optional (DOCSIS fallback) On ARM: IPsec MB required, OpenSSL required (DOCSIS support)

---
 doc/guides/cryptodevs/qat.rst        |  28 +-
 drivers/common/qat/meson.build       |  69 +++--
 drivers/crypto/qat/qat_sym_session.c | 412 +--------------------------
 3 files changed, 74 insertions(+), 435 deletions(-)
doc/guides/cryptodevs/qat.rst +19 -9
index 0c2b85444e..4e60e8343c 100644
@@ -352,15 +352,25 @@ To use this feature the user must set the devarg on process start as a device ad
  -a 03:01.1,qat_sym_cipher_crc_enable=1
 
 
-Running QAT PMD with Intel IPsec MB library for symmetric precomputes function
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The QAT PMD uses Intel IPsec MB library for partial hash calculation
-in symmetric precomputes function by default,
-the minimum required version of IPsec MB library is v1.4.
-If this version of IPsec is not met, it will fallback to use OpenSSL.
-ARM will always default to using OpenSSL
-as ARM IPsec MB does not support the necessary algorithms.
+Running QAT PMD with Intel IPsec MB library
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The QAT PMD requires IPsec MB library for HMAC partial hash calculation
+in symmetric precomputes function. OpenSSL 3.0+ removed the low-level SHA*_Transform APIs
+that were previously used for HMAC precomputes.
+
+**On x86 platforms:**
+
+* Intel IPsec MB library (v1.4.0+) is required for HMAC precomputes
+* OpenSSL (3.0+) is optional for DOCSIS BPI cipher fallback
+
+**On ARM platforms:**
+
+* ARM IPsec MB library from ``gitlab.arm.com/arm-reference-solutions/ipsec-mb``
+  is required for HMAC precomputes.
+* OpenSSL (3.0+) is required for DOCSIS BPI cipher algorithms. ARM IPsec MB does not
+  implement CFB-one-byte cipher modes needed for DOCSIS. Without OpenSSL, DOCSIS
+  algorithms will not be available on ARM.
 
 
 Device and driver naming
drivers/common/qat/meson.build +40 -29

87 lines not on this page · raw message

drivers/crypto/qat/qat_sym_session.c +15 -397

511 lines not on this page · raw message

Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v2 1/1 crypto/qat: require IPsec MB for HMAC precomputes

IPsec MB library (v1.4.0+) is now required for HMAC precomputes as OpenSSL 3.0 removed SHA*_Transform APIs. OpenSSL remains optional for DOCSIS BPI cipher fallback via EVP API.

On x86: IPsec MB required, OpenSSL optional (DOCSIS fallback) On ARM: IPsec MB required, OpenSSL required (DOCSIS support)

---
v2:
* Fix resource leak in ossl_legacy_provider_load()
* Added release note

---
 doc/guides/cryptodevs/qat.rst          |  28 +-
 doc/guides/rel_notes/release_26_07.rst |   8 +
 drivers/common/qat/meson.build         |  56 ++--
 drivers/crypto/qat/qat_sym_session.c   | 440 +++----------------------
 4 files changed, 100 insertions(+), 432 deletions(-)
doc/guides/cryptodevs/qat.rst +19 -9
index 0c2b85444e..4e60e8343c 100644
@@ -352,15 +352,25 @@ To use this feature the user must set the devarg on process start as a device ad
  -a 03:01.1,qat_sym_cipher_crc_enable=1
 
 
-Running QAT PMD with Intel IPsec MB library for symmetric precomputes function
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The QAT PMD uses Intel IPsec MB library for partial hash calculation
-in symmetric precomputes function by default,
-the minimum required version of IPsec MB library is v1.4.
-If this version of IPsec is not met, it will fallback to use OpenSSL.
-ARM will always default to using OpenSSL
-as ARM IPsec MB does not support the necessary algorithms.
+Running QAT PMD with Intel IPsec MB library
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The QAT PMD requires IPsec MB library for HMAC partial hash calculation
+in symmetric precomputes function. OpenSSL 3.0+ removed the low-level SHA*_Transform APIs
+that were previously used for HMAC precomputes.
+
+**On x86 platforms:**
+
+* Intel IPsec MB library (v1.4.0+) is required for HMAC precomputes
+* OpenSSL (3.0+) is optional for DOCSIS BPI cipher fallback
+
+**On ARM platforms:**
+
+* ARM IPsec MB library from ``gitlab.arm.com/arm-reference-solutions/ipsec-mb``
+  is required for HMAC precomputes.
+* OpenSSL (3.0+) is required for DOCSIS BPI cipher algorithms. ARM IPsec MB does not
+  implement CFB-one-byte cipher modes needed for DOCSIS. Without OpenSSL, DOCSIS
+  algorithms will not be available on ARM.
 
 
 Device and driver naming
doc/guides/rel_notes/release_26_07.rst +8 -0
index 34809a4850..809ec19d66 100644
@@ -155,6 +155,14 @@ New Features
   Added AGENTS.md file for AI review
   and supporting scripts to review patches and documentation.
 
+* **Updated QAT PMD dependency requirements.**
+
+  The QAT crypto PMD now requires IPsec MB library (v1.4.0+) for HMAC precomputes
+  on all platforms. OpenSSL 3.0+ is now optional and used only for DOCSIS BPI cipher
+  fallback. Previously, QAT could build with OpenSSL-only on x86.
+
+  On ARM, both IPsec MB and OpenSSL are required for full functionality.
+
 
 Removed Items
 -------------
drivers/common/qat/meson.build +35 -21

82 lines not on this page · raw message

drivers/crypto/qat/qat_sym_session.c +38 -402

569 lines not on this page · raw message

Signature · 1 line
2.43.0
#2 lore raw

drivers/crypto/qat/qat_sym_session.c qat_security_session_create(void *dev, · line 2836

Quoted 13 lines
drivers/crypto/qat/qat_sym_session.c +5 -0
 		if (ret) {
 			QAT_LOG(ERR, "(MD5)precompute failed");
 			return -EFAULT;
@@ -3197,6 +2828,11 @@ qat_security_session_create(void *dev,
 			sess_private_data,
 SECURITY_GET_SESS_PRIV_IOVA(sess));
 	if (ret != 0) {
 		QAT_LOG(ERR, "Failed to configure session parameters");
+#ifdef RTE_QAT_OPENSSL
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+		ossl_legacy_provider_unload();
+#endif
+#endif

Why is this openssl version check required now?
Version < 3.0 is not supported in dpdk.

author
#3 lore raw

PATCH v3 1/1 crypto/qat: require IPsec MB for HMAC precomputes

In reply to Emma Finn

IPsec MB library (v1.4.0+) is now required for HMAC precomputes as OpenSSL 3.0 removed SHA*_Transform APIs. OpenSSL remains optional for DOCSIS BPI cipher fallback via EVP API.

On x86: IPsec MB required, OpenSSL optional (DOCSIS fallback) On ARM: IPsec MB required, OpenSSL required (DOCSIS support)

---
v2:
* Fix resource leak in ossl_legacy_provider_load()
* Added release note
v3:
* Removed checks for openssl <= 3.0

---
 doc/guides/cryptodevs/qat.rst          |  28 +-
 doc/guides/rel_notes/release_26_07.rst |   8 +
 drivers/common/qat/meson.build         |  56 ++--
 drivers/crypto/qat/qat_sym_session.c   | 448 ++-----------------------
 4 files changed, 97 insertions(+), 443 deletions(-)
doc/guides/cryptodevs/qat.rst +19 -9
index 0c2b85444e..4e60e8343c 100644
@@ -352,15 +352,25 @@ To use this feature the user must set the devarg on process start as a device ad
  -a 03:01.1,qat_sym_cipher_crc_enable=1
 
 
-Running QAT PMD with Intel IPsec MB library for symmetric precomputes function
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The QAT PMD uses Intel IPsec MB library for partial hash calculation
-in symmetric precomputes function by default,
-the minimum required version of IPsec MB library is v1.4.
-If this version of IPsec is not met, it will fallback to use OpenSSL.
-ARM will always default to using OpenSSL
-as ARM IPsec MB does not support the necessary algorithms.
+Running QAT PMD with Intel IPsec MB library
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The QAT PMD requires IPsec MB library for HMAC partial hash calculation
+in symmetric precomputes function. OpenSSL 3.0+ removed the low-level SHA*_Transform APIs
+that were previously used for HMAC precomputes.
+
+**On x86 platforms:**
+
+* Intel IPsec MB library (v1.4.0+) is required for HMAC precomputes
+* OpenSSL (3.0+) is optional for DOCSIS BPI cipher fallback
+
+**On ARM platforms:**
+
+* ARM IPsec MB library from ``gitlab.arm.com/arm-reference-solutions/ipsec-mb``
+  is required for HMAC precomputes.
+* OpenSSL (3.0+) is required for DOCSIS BPI cipher algorithms. ARM IPsec MB does not
+  implement CFB-one-byte cipher modes needed for DOCSIS. Without OpenSSL, DOCSIS
+  algorithms will not be available on ARM.
 
 
 Device and driver naming
doc/guides/rel_notes/release_26_07.rst +8 -0
index 34809a4850..809ec19d66 100644
@@ -155,6 +155,14 @@ New Features
   Added AGENTS.md file for AI review
   and supporting scripts to review patches and documentation.
 
+* **Updated QAT PMD dependency requirements.**
+
+  The QAT crypto PMD now requires IPsec MB library (v1.4.0+) for HMAC precomputes
+  on all platforms. OpenSSL 3.0+ is now optional and used only for DOCSIS BPI cipher
+  fallback. Previously, QAT could build with OpenSSL-only on x86.
+
+  On ARM, both IPsec MB and OpenSSL are required for full functionality.
+
 
 Removed Items
 -------------
drivers/common/qat/meson.build +35 -21

82 lines not on this page · raw message

drivers/crypto/qat/qat_sym_session.c +35 -413

601 lines not on this page · raw message

Signature · 1 line
2.43.0
Applied
#4 lore raw
Quoted 14 lines

IPsec MB library (v1.4.0+) is now required for HMAC precomputes as OpenSSL 3.0 removed SHA*_Transform APIs. OpenSSL remains optional for DOCSIS BPI cipher fallback via EVP API.

On x86: IPsec MB required, OpenSSL optional (DOCSIS fallback) On ARM: IPsec MB required, OpenSSL required (DOCSIS support)

---
v2:
* Fix resource leak in ossl_legacy_provider_load()
* Added release note
v3:
* Removed checks for openssl <= 3.0

Quoted 6 lines
---
 doc/guides/cryptodevs/qat.rst          |  28 +-
 doc/guides/rel_notes/release_26_07.rst |   8 +
 drivers/common/qat/meson.build         |  56 ++--
 drivers/crypto/qat/qat_sym_session.c   | 448 ++-----------------------
 4 files changed, 97 insertions(+), 443 deletions(-)

Applied to dpdk-next-crypto

#5 lore raw
Quoted 15 lines
Quoted 7 lines

IPsec MB library (v1.4.0+) is now required for HMAC precomputes as OpenSSL 3.0 removed SHA*_Transform APIs. OpenSSL remains optional for DOCSIS BPI cipher fallback via EVP API.

On x86: IPsec MB required, OpenSSL optional (DOCSIS fallback) On ARM: IPsec MB required, OpenSSL required (DOCSIS support)

Quoted 8 lines

---
v2:
* Fix resource leak in ossl_legacy_provider_load()
* Added release note
v3:
* Removed checks for openssl <= 3.0
---

Quoted 1 line

Applied to dpdk-next-crypto

It does not compile on Arm:
drivers/crypto/qat/qat_sym_session.h:156:9: error: unknown type name 'IMB_MGR'

author
#6 lore raw
Quoted 25 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Monday 29 June 2026 15:36
To: [email protected]; Finn, Emma <[email protected]>; Ji, Kai <[email protected]>
Cc: [email protected]
Subject: Re: [EXTERNAL] [v3] crypto/qat: require IPsec MB for HMAC precomputes
Importance: High

Quoted 15 lines
Quoted 15 lines

IPsec MB library (v1.4.0+) is now required for HMAC precomputes as OpenSSL 3.0 removed SHA*_Transform APIs. OpenSSL remains optional for DOCSIS BPI cipher fallback via EVP API.

On x86: IPsec MB required, OpenSSL optional (DOCSIS fallback) On ARM:
IPsec MB required, OpenSSL required (DOCSIS support)

---
v2:
* Fix resource leak in ossl_legacy_provider_load()
* Added release note
v3:
* Removed checks for openssl <= 3.0
---

Quoted 5 lines
Quoted 1 line

Applied to dpdk-next-crypto

It does not compile on Arm:
drivers/crypto/qat/qat_sym_session.h:156:9: error: unknown type name 'IMB_MGR'

The header file was missing the IPsec MB include for ARM causing the IMB_MGR type to be undefined when the struct field was declared. I will send a patch to fix this.