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

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Thu Jul 7 09:54:27 CEST 2022


Hi,

FYI, your patch has been queued to stable release 19.11.13

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/09/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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/57ae04724a4a45ca27f776843fca798e89f99017

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 57ae04724a4a45ca27f776843fca798e89f99017 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 4256734d16..1536b1a647 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -2,6 +2,8 @@
  *   Copyright(c) 2018 Advanced Micro Devices, Inc. All rights reserved.
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <dirent.h>
 #include <fcntl.h>
 #include <stdio.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 3e0afd71a1..aee8dea0c6 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2016-2017 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index cbfb8149f9..4dda2e0c2f 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2016-2017 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <string.h>
 
 #include <rte_common.h>
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 696b231a00..150c6a8b52 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2019 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <openssl/evp.h>
 
 #include <rte_mempool.h>
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index ab12c99716..17647ea7b5 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2019 Intel Corporation
  */
 
+#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 */
 #include <openssl/md5.h>	/* Needed to calculate pre-compute values */
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.568925220 +0200
+++ 0032-drivers-crypto-fix-warnings-for-OpenSSL-version.patch	2022-07-07 09:54:10.861823975 +0200
@@ -1 +1 @@
-From 7360749f167b9039f549818700db3f57d6f8a9fd Mon Sep 17 00:00:00 2001
+From 57ae04724a4a45ca27f776843fca798e89f99017 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 7360749f167b9039f549818700db3f57d6f8a9fd ]
+
@@ -24 +25,0 @@
-Cc: stable at dpdk.org
@@ -39 +40 @@
-index 4ed91a7436..4bab18323b 100644
+index 4256734d16..1536b1a647 100644
@@ -52 +53 @@
-index d80e1052e2..4f331af157 100644
+index 3e0afd71a1..aee8dea0c6 100644
@@ -65 +66 @@
-index 1cb07794bd..87c395a836 100644
+index cbfb8149f9..4dda2e0c2f 100644
@@ -78 +79 @@
-index ca8c9a8124..3a6c9dcc0a 100644
+index 696b231a00..150c6a8b52 100644
@@ -82 +83 @@
-  * Copyright(c) 2015-2022 Intel Corporation
+  * Copyright(c) 2015-2019 Intel Corporation
@@ -91 +92 @@
-index 9d6a19c0be..737a180810 100644
+index ab12c99716..17647ea7b5 100644
@@ -95 +96 @@
-  * Copyright(c) 2015-2022 Intel Corporation
+  * Copyright(c) 2015-2019 Intel Corporation


More information about the stable mailing list