[v2] crypto/qat: fix build

Message ID 20230118110558.1136485-1-pablo.de.lara.guarch@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [v2] crypto/qat: fix build |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

De Lara Guarch, Pablo Jan. 18, 2023, 11:05 a.m. UTC
  When building QAT PMD, the following issue comes up:

intel-ipsec-mb.h:333: error: "AES_BLOCK_SIZE" redefined
  333 | #define AES_BLOCK_SIZE          IMB_AES_BLOCK_SIZE
In file included from drivers/crypto/qat/qat_sym_session.c:8:
/usr/include/openssl/aes.h:26: previous definition
   26 | # define AES_BLOCK_SIZE 16

By defining NO_COMPAT_IMB_API_053, it prevents legacy macros
like AES_BLOCK_SIZE from being defined from IPSec MB library,
avoiding the redefinition.

Fixes: 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and AES")
Cc: stable@dpdk.org
Cc: kai.ji@intel.com

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
v2: reworded the commit message
---

 drivers/crypto/qat/qat_sym_session.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Ji, Kai Jan. 18, 2023, 2:17 p.m. UTC | #1
Acked-by: Kai Ji <kai.ji@intel.com>

> -----Original Message-----
> From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Sent: Wednesday, January 18, 2023 11:06 AM
> To: gakhil@marvell.com
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> stable@dpdk.org; Ji, Kai <kai.ji@intel.com>
> Subject: [PATCH v2] crypto/qat: fix build
> 
> When building QAT PMD, the following issue comes up:
> 
> intel-ipsec-mb.h:333: error: "AES_BLOCK_SIZE" redefined
>   333 | #define AES_BLOCK_SIZE          IMB_AES_BLOCK_SIZE
> In file included from drivers/crypto/qat/qat_sym_session.c:8:
> /usr/include/openssl/aes.h:26: previous definition
>    26 | # define AES_BLOCK_SIZE 16
> 
> By defining NO_COMPAT_IMB_API_053, it prevents legacy macros like
> AES_BLOCK_SIZE from being defined from IPSec MB library, avoiding the
> redefinition.
> 
> Fixes: 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash
> and AES")
> Cc: stable@dpdk.org
> Cc: kai.ji@intel.com
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> v2: reworded the commit message
> ---
> 
>  drivers/crypto/qat/qat_sym_session.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/crypto/qat/qat_sym_session.c
> b/drivers/crypto/qat/qat_sym_session.c
> index 978ee49dce..7f18e9875d 100644
> --- a/drivers/crypto/qat/qat_sym_session.c
> +++ b/drivers/crypto/qat/qat_sym_session.c
> @@ -10,6 +10,7 @@
>  #include <openssl/evp.h>	/* Needed for bpi runt block processing */
> 
>  #ifdef RTE_QAT_LIBIPSECMB
> +#define NO_COMPAT_IMB_API_053
>  #if defined(RTE_ARCH_ARM)
>  #include <ipsec-mb.h>
>  #else
> --
> 2.34.1
  
Akhil Goyal Jan. 19, 2023, 9:35 a.m. UTC | #2
> Acked-by: Kai Ji <kai.ji@intel.com>
> 
> > Subject: [PATCH v2] crypto/qat: fix build
> >
> > When building QAT PMD, the following issue comes up:
> >
> > intel-ipsec-mb.h:333: error: "AES_BLOCK_SIZE" redefined
> >   333 | #define AES_BLOCK_SIZE          IMB_AES_BLOCK_SIZE
> > In file included from drivers/crypto/qat/qat_sym_session.c:8:
> > /usr/include/openssl/aes.h:26: previous definition
> >    26 | # define AES_BLOCK_SIZE 16
> >
> > By defining NO_COMPAT_IMB_API_053, it prevents legacy macros like
> > AES_BLOCK_SIZE from being defined from IPSec MB library, avoiding the
> > redefinition.
> >
> > Fixes: 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash
> > and AES")
> > Cc: stable@dpdk.org
> > Cc: kai.ji@intel.com
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 978ee49dce..7f18e9875d 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -10,6 +10,7 @@ 
 #include <openssl/evp.h>	/* Needed for bpi runt block processing */
 
 #ifdef RTE_QAT_LIBIPSECMB
+#define NO_COMPAT_IMB_API_053
 #if defined(RTE_ARCH_ARM)
 #include <ipsec-mb.h>
 #else