DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] drivers: define OPENSSL_API_COMPAT
@ 2022-05-10 15:06 Heinrich Schuchardt
  2022-05-13 10:02 ` Gao, DaxueX
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Heinrich Schuchardt @ 2022-05-10 15:06 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Chandubabu Namburu, dev, Heinrich Schuchardt

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.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.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
@@ -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 d80e1052e2..4f331af157 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 1cb07794bd..87c395a836 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 ca8c9a8124..3a6c9dcc0a 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2022 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 9d6a19c0be..737a180810 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2022 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.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH 1/1] drivers: define OPENSSL_API_COMPAT
  2022-05-10 15:06 [PATCH 1/1] drivers: define OPENSSL_API_COMPAT Heinrich Schuchardt
@ 2022-05-13 10:02 ` Gao, DaxueX
  2022-05-17 12:03 ` David Marchand
  2022-05-17 16:30 ` Ji, Kai
  2 siblings, 0 replies; 5+ messages in thread
From: Gao, DaxueX @ 2022-05-13 10:02 UTC (permalink / raw)
  To: Heinrich Schuchardt, Zhang, Roy Fan; +Cc: Chandubabu Namburu, dev



> -----Original Message-----
> From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Sent: 2022年5月10日 23:07
> To: Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Cc: Chandubabu Namburu <chandu@amd.com>; dev@dpdk.org; Heinrich
> Schuchardt <heinrich.schuchardt@canonical.com>
> Subject: [PATCH 1/1] drivers: define OPENSSL_API_COMPAT
> 
> 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.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
Tested-by: Daxue Gao <daxuex.gao@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] drivers: define OPENSSL_API_COMPAT
  2022-05-10 15:06 [PATCH 1/1] drivers: define OPENSSL_API_COMPAT Heinrich Schuchardt
  2022-05-13 10:02 ` Gao, DaxueX
@ 2022-05-17 12:03 ` David Marchand
  2022-05-26 16:18   ` [EXT] " Akhil Goyal
  2022-05-17 16:30 ` Ji, Kai
  2 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2022-05-17 12:03 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Fan Zhang, Chandubabu Namburu, dev

On Tue, May 10, 2022 at 5:06 PM Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> 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.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

Thanks for the fix, I got a new shiny laptop running Fedora 36 and hit
this issue.
That may be something we want to backport, and I would then Cc: stable@dpdk.org.

Tested-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH 1/1] drivers: define OPENSSL_API_COMPAT
  2022-05-10 15:06 [PATCH 1/1] drivers: define OPENSSL_API_COMPAT Heinrich Schuchardt
  2022-05-13 10:02 ` Gao, DaxueX
  2022-05-17 12:03 ` David Marchand
@ 2022-05-17 16:30 ` Ji, Kai
  2 siblings, 0 replies; 5+ messages in thread
From: Ji, Kai @ 2022-05-17 16:30 UTC (permalink / raw)
  To: Heinrich Schuchardt, Zhang, Roy Fan, Ji, Kai; +Cc: Chandubabu Namburu, dev

Acked-by: Ji, Kai <kai.ji@intel.com>

> -----Original Message-----
> From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Sent: Tuesday, May 10, 2022 4:07 PM
> To: Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Cc: Chandubabu Namburu <chandu@amd.com>; dev@dpdk.org; Heinrich
> Schuchardt <heinrich.schuchardt@canonical.com>
> Subject: [PATCH 1/1] drivers: define OPENSSL_API_COMPAT
> 
> 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.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> 2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [EXT] Re: [PATCH 1/1] drivers: define OPENSSL_API_COMPAT
  2022-05-17 12:03 ` David Marchand
@ 2022-05-26 16:18   ` Akhil Goyal
  0 siblings, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2022-05-26 16:18 UTC (permalink / raw)
  To: David Marchand, Heinrich Schuchardt
  Cc: Fan Zhang, Chandubabu Namburu, dev, stable

> On Tue, May 10, 2022 at 5:06 PM Heinrich Schuchardt
> <heinrich.schuchardt@canonical.com> wrote:
> >
> > 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.
> >
> > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> 
> Thanks for the fix, I got a new shiny laptop running Fedora 36 and hit
> this issue.
> That may be something we want to backport, and I would then Cc:
> stable@dpdk.org.
> 
> Tested-by: David Marchand <david.marchand@redhat.com>
Applied to dpdk-next-crypto

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-26 16:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 15:06 [PATCH 1/1] drivers: define OPENSSL_API_COMPAT Heinrich Schuchardt
2022-05-13 10:02 ` Gao, DaxueX
2022-05-17 12:03 ` David Marchand
2022-05-26 16:18   ` [EXT] " Akhil Goyal
2022-05-17 16:30 ` Ji, Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).