[v2,1/5] drivers/crypto: suppress openssl deprecated api warning messages

Message ID 20220516101039.4537-2-kai.ji@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series crypto/openssl: EVP api update for 3.0 lib |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Ji, Kai May 16, 2022, 10:10 a.m. UTC
  Enable openssl_api_compat cflag to suppress deprecated api warning
messages in crypto pmd drivers: ccp, openssl and qat.

Signed-off-by: Kai Ji <kai.ji@intel.com>
---
 drivers/common/qat/meson.build     | 1 +
 drivers/crypto/ccp/meson.build     | 1 +
 drivers/crypto/openssl/meson.build | 1 +
 3 files changed, 3 insertions(+)
  

Comments

Akhil Goyal May 16, 2022, 7:21 p.m. UTC | #1
Hi Kai,
> Enable openssl_api_compat cflag to suppress deprecated api warning
> messages in crypto pmd drivers: ccp, openssl and qat.
> 
> Signed-off-by: Kai Ji <kai.ji@intel.com>
This patch may not be required if we use this
http://patches.dpdk.org/project/dpdk/patch/20220510150635.61975-1-heinrich.schuchardt@canonical.com/


> ---
>  drivers/common/qat/meson.build     | 1 +
>  drivers/crypto/ccp/meson.build     | 1 +
>  drivers/crypto/openssl/meson.build | 1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/drivers/common/qat/meson.build
> b/drivers/common/qat/meson.build
> index b7027f3164..6c3e7275ef 100644
> --- a/drivers/common/qat/meson.build
> +++ b/drivers/common/qat/meson.build
> @@ -87,3 +87,4 @@ if qat_crypto
>      ext_deps += libcrypto
>      cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM']
>  endif
> +cflags += ['-DOPENSSL_API_COMPAT=0x10100000L']
> diff --git a/drivers/crypto/ccp/meson.build b/drivers/crypto/ccp/meson.build
> index a4f3406009..fe89e17b14 100644
> --- a/drivers/crypto/ccp/meson.build
> +++ b/drivers/crypto/ccp/meson.build
> @@ -23,3 +23,4 @@ sources = files(
>  )
> 
>  ext_deps += dep
> +cflags += ['-DOPENSSL_API_COMPAT=0x10100000L']
> diff --git a/drivers/crypto/openssl/meson.build
> b/drivers/crypto/openssl/meson.build
> index cd962da1d6..9a3dea2c04 100644
> --- a/drivers/crypto/openssl/meson.build
> +++ b/drivers/crypto/openssl/meson.build
> @@ -15,3 +15,4 @@ endif
>  deps += 'bus_vdev'
>  sources = files('rte_openssl_pmd.c', 'rte_openssl_pmd_ops.c')
>  ext_deps += dep
> +cflags += ['-DOPENSSL_API_COMPAT=0x10100000L']
> --
> 2.17.1
  
Stephen Hemminger May 16, 2022, 8:20 p.m. UTC | #2
On Mon, 16 May 2022 19:21:01 +0000
Akhil Goyal <gakhil@marvell.com> wrote:

> Hi Kai,
> > Enable openssl_api_compat cflag to suppress deprecated api warning
> > messages in crypto pmd drivers: ccp, openssl and qat.
> > 
> > Signed-off-by: Kai Ji <kai.ji@intel.com>  
> This patch may not be required if we use this
> http://patches.dpdk.org/project/dpdk/patch/20220510150635.61975-1-heinrich.schuchardt@canonical.com/
> 

Just to be devil's advocate. Why should DPDK continue to support older and
unsecure crypto algorithms? I would argue DPDK should deprecate the use of SNA256
and remove it in 22.11 release.
  
Akhil Goyal May 17, 2022, 6:52 a.m. UTC | #3
> 
> Just to be devil's advocate. Why should DPDK continue to support older and
> unsecure crypto algorithms? I would argue DPDK should deprecate the use of
> SNA256
> and remove it in 22.11 release.

AFAIK Openssl 1.1 is not outdated and there are customers which are still
Not migrated to openssl 3.0. Hence cannot completely remove that.
  

Patch

diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build
index b7027f3164..6c3e7275ef 100644
--- a/drivers/common/qat/meson.build
+++ b/drivers/common/qat/meson.build
@@ -87,3 +87,4 @@  if qat_crypto
     ext_deps += libcrypto
     cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM']
 endif
+cflags += ['-DOPENSSL_API_COMPAT=0x10100000L']
diff --git a/drivers/crypto/ccp/meson.build b/drivers/crypto/ccp/meson.build
index a4f3406009..fe89e17b14 100644
--- a/drivers/crypto/ccp/meson.build
+++ b/drivers/crypto/ccp/meson.build
@@ -23,3 +23,4 @@  sources = files(
 )
 
 ext_deps += dep
+cflags += ['-DOPENSSL_API_COMPAT=0x10100000L']
diff --git a/drivers/crypto/openssl/meson.build b/drivers/crypto/openssl/meson.build
index cd962da1d6..9a3dea2c04 100644
--- a/drivers/crypto/openssl/meson.build
+++ b/drivers/crypto/openssl/meson.build
@@ -15,3 +15,4 @@  endif
 deps += 'bus_vdev'
 sources = files('rte_openssl_pmd.c', 'rte_openssl_pmd_ops.c')
 ext_deps += dep
+cflags += ['-DOPENSSL_API_COMPAT=0x10100000L']