patch 'drivers/crypto: fix warnings for OpenSSL version' has been queued to stable release 21.11.2

Kevin Traynor ktraynor at redhat.com
Thu Jun 9 13:36:02 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ef06b4307eb59be8ef67eb4cdfcdb12992051e0e

Thanks.

Kevin

---
>From ef06b4307eb59be8ef67eb4cdfcdb12992051e0e Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
Date: Tue, 10 May 2022 17:06:35 +0200
Subject: [PATCH] drivers/crypto: fix warnings for OpenSSL version
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 7360749f167b9039f549818700db3f57d6f8a9fd ]

The API of the OpenSSL library has changed with version 3.0. This results
in a lot of compiler warnings like

    ../dpdk/drivers/crypto/ccp/ccp_crypto.c:182:9:
    warning: ‘SHA256_Transform’ is deprecated:
    Since OpenSSL 3.0 [-Wdeprecated-declarations]

As many Linux distributions still use elder OpenSSL libraries we cannot
change the used API now. Instead define OPENSSL_API_COMPAT to indicate
that we are using the OpenSSL 1.1.0 API.

OPENSSL_API_COMPAT is introduced in *.c files and not in *.h files as some
*.c files directly include OpenSSL headers.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
Tested-by: Daxue Gao <daxuex.gao at intel.com>
Tested-by: David Marchand <david.marchand at redhat.com>
Acked-by: Kai Ji <kai.ji at intel.com>
---
 drivers/crypto/ccp/ccp_crypto.c              | 2 ++
 drivers/crypto/openssl/rte_openssl_pmd.c     | 2 ++
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 2 ++
 drivers/crypto/qat/qat_sym.c                 | 2 ++
 drivers/crypto/qat/qat_sym_session.c         | 2 ++
 5 files changed, 10 insertions(+)

diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 4ed91a7436..4bab18323b 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -3,4 +3,6 @@
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <dirent.h>
 #include <fcntl.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 5794ed8159..5977bc746c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -3,4 +3,6 @@
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <rte_common.h>
 #include <rte_hexdump.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 52715f86f8..35c4ad13ba 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -3,4 +3,6 @@
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <string.h>
 
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 00ec703754..0dd83ee2ee 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -3,4 +3,6 @@
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <openssl/evp.h>
 
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 8ca475ca8b..f439bbd0f1 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -3,4 +3,6 @@
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <openssl/sha.h>	/* Needed to calculate pre-compute values */
 #include <openssl/aes.h>	/* Needed to calculate pre-compute values */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:30.126109737 +0100
+++ 0015-drivers-crypto-fix-warnings-for-OpenSSL-version.patch	2022-06-09 12:34:29.640980462 +0100
@@ -1 +1 @@
-From 7360749f167b9039f549818700db3f57d6f8a9fd Mon Sep 17 00:00:00 2001
+From ef06b4307eb59be8ef67eb4cdfcdb12992051e0e Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 7360749f167b9039f549818700db3f57d6f8a9fd ]
+
@@ -24 +25,0 @@
-Cc: stable at dpdk.org
@@ -50 +51 @@
-index d80e1052e2..4f331af157 100644
+index 5794ed8159..5977bc746c 100644
@@ -61 +62 @@
-index 1cb07794bd..87c395a836 100644
+index 52715f86f8..35c4ad13ba 100644
@@ -72 +73 @@
-index ca8c9a8124..3a6c9dcc0a 100644
+index 00ec703754..0dd83ee2ee 100644
@@ -83 +84 @@
-index 9d6a19c0be..737a180810 100644
+index 8ca475ca8b..f439bbd0f1 100644



More information about the stable mailing list