[PATCH 02/12] crypto/cnxk: fix build with GCC 12

Stephen Hemminger stephen at networkplumber.org
Fri May 20 22:24:25 CEST 2022


On Wed, 18 May 2022 12:16:47 +0200
David Marchand <david.marchand at redhat.com> wrote:

> GCC 12 raises the following warning:
> 
> In file included from ../drivers/crypto/cnxk/cn10k_cryptodev_ops.c:17:
> In function ‘fill_sg_comp_from_iov’,
>     inlined from ‘cpt_kasumi_enc_prep’ at
>         ../drivers/crypto/cnxk/cnxk_se.h:1413:8,
>     inlined from ‘cpt_fc_enc_hmac_prep’ at
>         ../drivers/crypto/cnxk/cnxk_se.h:1635:9,
>     inlined from ‘fill_digest_params’ at
>         ../drivers/crypto/cnxk/cnxk_se.h:2524:8,
>     inlined from ‘cpt_sym_inst_fill’ at
>         ../drivers/crypto/cnxk/cn10k_cryptodev_ops.c:92:9,
>     inlined from ‘cn10k_cpt_fill_inst.constprop.isra’ at
>         ../drivers/crypto/cnxk/cn10k_cryptodev_ops.c:146:10:
> ../drivers/crypto/cnxk/cnxk_se.h:208:52: error: array subscript 0 is
>         outside array bounds of ‘struct roc_se_buf_ptr[0]’
>         [-Werror=array-bounds]
>   208 |             e_vaddr = (uint64_t)bufs[j].vaddr;
>       |                                 ~~~~~~~^~~~~~
> ../drivers/crypto/cnxk/cnxk_se.h:209:48: error: array subscript 0 is
>         outside array bounds of ‘struct roc_se_buf_ptr[0]’
>         [-Werror=array-bounds]
>   209 |             e_len = (size > bufs[j].size) ? bufs[j].size : size;
>       |                             ~~~~~~~^~~~~
> 
> For now, waive this warning until we have a proper fix.
> 
> Cc: stable at dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand at redhat.com>

If you fix iov_ptr_t to be flexible array this won't be needed.


More information about the stable mailing list