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

Xueming Li xuemingl at nvidia.com
Tue Jun 21 10:02:12 CEST 2022


Hi,

FYI, your patch has been queued to stable release 20.11.6

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/23/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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5e4a008e4e1442c7f3d7d1e6808dad8b87fd9029

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 5e4a008e4e1442c7f3d7d1e6808dad8b87fd9029 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 9fb03cc244..e66aa98e2a 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 ca4265d2be..786c87baed 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 ed75877581..1b075fd847 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 f7992a0a33..86fc7aff38 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 6e2193fb69..aa9ce1236b 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.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.299524004 +0800
+++ 0066-drivers-crypto-fix-warnings-for-OpenSSL-version.patch	2022-06-21 15:37:49.094451453 +0800
@@ -1 +1 @@
-From 7360749f167b9039f549818700db3f57d6f8a9fd Mon Sep 17 00:00:00 2001
+From 5e4a008e4e1442c7f3d7d1e6808dad8b87fd9029 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 7360749f167b9039f549818700db3f57d6f8a9fd ]
@@ -24 +26,0 @@
-Cc: stable at dpdk.org
@@ -39 +41 @@
-index 4ed91a7436..4bab18323b 100644
+index 9fb03cc244..e66aa98e2a 100644
@@ -52 +54 @@
-index d80e1052e2..4f331af157 100644
+index ca4265d2be..786c87baed 100644
@@ -65 +67 @@
-index 1cb07794bd..87c395a836 100644
+index ed75877581..1b075fd847 100644
@@ -78 +80 @@
-index ca8c9a8124..3a6c9dcc0a 100644
+index f7992a0a33..86fc7aff38 100644
@@ -82 +84 @@
-  * Copyright(c) 2015-2022 Intel Corporation
+  * Copyright(c) 2015-2019 Intel Corporation
@@ -91 +93 @@
-index 9d6a19c0be..737a180810 100644
+index 6e2193fb69..aa9ce1236b 100644
@@ -95 +97 @@
-  * Copyright(c) 2015-2022 Intel Corporation
+  * Copyright(c) 2015-2019 Intel Corporation


More information about the stable mailing list