crypto/qat: fix build for generic x86 with GCC 12

Message ID 20230109103436.996994-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series crypto/qat: fix build for generic x86 with GCC 12 |

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-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS

Commit Message

David Marchand Jan. 9, 2023, 10:34 a.m. UTC
  Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12").
The issue appears when building with the "generic" target we have in
devtools/test-meson-builds.sh.

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

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/crypto/qat/qat_sym_session.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Bruce Richardson Jan. 10, 2023, 11:26 a.m. UTC | #1
On Mon, Jan 09, 2023 at 11:34:36AM +0100, David Marchand wrote:
> Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12").
> The issue appears when building with the "generic" target we have in
> devtools/test-meson-builds.sh.
> 
> Fixes: 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and AES")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  drivers/crypto/qat/qat_sym_session.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
Confirm that this fixes the build issue.

Tested-by: Bruce Richardson <bruce.richardson@intel.com>
  
David Marchand Jan. 17, 2023, 8:10 a.m. UTC | #2
On Tue, Jan 10, 2023 at 12:27 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Mon, Jan 09, 2023 at 11:34:36AM +0100, David Marchand wrote:
> > Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12").
> > The issue appears when building with the "generic" target we have in
> > devtools/test-meson-builds.sh.
> >
> > Fixes: 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and AES")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> >  drivers/crypto/qat/qat_sym_session.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> Confirm that this fixes the build issue.
>
> Tested-by: Bruce Richardson <bruce.richardson@intel.com>
>

No objection from maintainer, Akhil, can you take this to next-crypto?
Thanks.
  
Akhil Goyal Jan. 17, 2023, 8:20 a.m. UTC | #3
> On Tue, Jan 10, 2023 at 12:27 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Mon, Jan 09, 2023 at 11:34:36AM +0100, David Marchand wrote:
> > > Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12").
> > > The issue appears when building with the "generic" target we have in
> > > devtools/test-meson-builds.sh.
> > >
> > > Fixes: 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and
> AES")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > ---
> > >  drivers/crypto/qat/qat_sym_session.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > Confirm that this fixes the build issue.
> >
> > Tested-by: Bruce Richardson <bruce.richardson@intel.com>
> >
> 
> No objection from maintainer, Akhil, can you take this to next-crypto?
Sure, will merge today/tomorrow.
  
Bruce Richardson Jan. 17, 2023, 9:02 a.m. UTC | #4
On Tue, Jan 17, 2023 at 08:20:48AM +0000, Akhil Goyal wrote:
> > On Tue, Jan 10, 2023 at 12:27 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > >
> > > On Mon, Jan 09, 2023 at 11:34:36AM +0100, David Marchand wrote:
> > > > Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12").
> > > > The issue appears when building with the "generic" target we have in
> > > > devtools/test-meson-builds.sh.
> > > >
> > > > Fixes: 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and
> > AES")
> > > > Cc: stable@dpdk.org
> > > >
> > > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > > ---
> > > >  drivers/crypto/qat/qat_sym_session.c | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > >
> > > Confirm that this fixes the build issue.
> > >
> > > Tested-by: Bruce Richardson <bruce.richardson@intel.com>
> > >
> > 
> > No objection from maintainer, Akhil, can you take this to next-crypto?
> Sure, will merge today/tomorrow.

Once merged into crypto can it be quickly pulled into the main tree, as the
build error is also seen there? I think build issues should generally be
fixed directly on main, as they affect those not working in the particular
subtree area.
  
Akhil Goyal Jan. 19, 2023, 9:37 a.m. UTC | #5
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Tuesday, January 17, 2023 2:33 PM
> To: Akhil Goyal <gakhil@marvell.com>
> Cc: David Marchand <david.marchand@redhat.com>; Kai Ji <kai.ji@intel.com>;
> dev@dpdk.org; stable@dpdk.org; Ciara Power <ciara.power@intel.com>; Fan
> Zhang <fanzhang.oss@gmail.com>
> Subject: Re: [EXT] Re: [PATCH] crypto/qat: fix build for generic x86 with GCC 12
> 
> On Tue, Jan 17, 2023 at 08:20:48AM +0000, Akhil Goyal wrote:
> > > On Tue, Jan 10, 2023 at 12:27 PM Bruce Richardson
> > > <bruce.richardson@intel.com> wrote:
> > > >
> > > > On Mon, Jan 09, 2023 at 11:34:36AM +0100, David Marchand wrote:
> > > > > Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12").
> > > > > The issue appears when building with the "generic" target we have in
> > > > > devtools/test-meson-builds.sh.
> > > > >
> > > > > Fixes: 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and
> > > AES")
> > > > > Cc: stable@dpdk.org
> > > > >
> > > > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > > > ---
> > > > >  drivers/crypto/qat/qat_sym_session.c | 2 ++
> > > > >  1 file changed, 2 insertions(+)
> > > > >
> > > > Confirm that this fixes the build issue.
> > > >
> > > > Tested-by: Bruce Richardson <bruce.richardson@intel.com>
> > > >
> > >
> > > No objection from maintainer, Akhil, can you take this to next-crypto?
> > Sure, will merge today/tomorrow.
> 
> Once merged into crypto can it be quickly pulled into the main tree, as the
> build error is also seen there? I think build issues should generally be
> fixed directly on main, as they affect those not working in the particular
> subtree area.

Applied to dpdk-next-crypto

Thomas can pick the tree with qat fixes.

Thanks.
  

Patch

diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 0ebc66f89e..84e998fb3f 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -1331,6 +1331,8 @@  static int qat_sym_do_precomputes_ipsec_mb(enum icp_qat_hw_auth_algo hash_alg,
 	/* init ipad and opad from key and xor with fixed values */
 	memset(ipad, 0, block_size);
 	memset(opad, 0, block_size);
+	RTE_VERIFY(auth_keylen <= sizeof(ipad));
+	RTE_VERIFY(auth_keylen <= sizeof(opad));
 	rte_memcpy(ipad, auth_key, auth_keylen);
 	rte_memcpy(opad, auth_key, auth_keylen);