From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 47314A0093; Fri, 20 May 2022 22:23:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E16C940222; Fri, 20 May 2022 22:23:40 +0200 (CEST) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id D84EC40156 for ; Fri, 20 May 2022 22:23:38 +0200 (CEST) Received: by mail-pj1-f48.google.com with SMTP id l20-20020a17090a409400b001dd2a9d555bso8783389pjg.0 for ; Fri, 20 May 2022 13:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ef6JjHTvE4nXc3IQSMi8Q9tMYUGwr/Pcb/GOc14dU6E=; b=f3yLTUQkNrUZ7+BYY+8rFWCESM0s8ceJ38zkoT7hOfAhgfTcBWsgsQrq4czCaRtUN8 0Oz20vvHMdqejHqUF/QuAhtjhGbFUEOOqD0zG1JqHHKG3rjBZfBpTljf0CKJ/MLRc9cT fEsySZABSG5C27l9NSxuwDvg4SSEFv+gA27SnAf+woJk/fQzyYUyhtGv+FIXjh6wmUrK ExhTB8KEEjnFQyrkFGsOtSDO2JGd4TJceW24j3QN364Q5W44id7vnjeXCL6mw125uWXD 0/900nlw91qlPaVjbCV72H/gYTgdKeEfuLwSJ3S35mXiz9IzIwj9V8haMbCzDsDFs3dB eDLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ef6JjHTvE4nXc3IQSMi8Q9tMYUGwr/Pcb/GOc14dU6E=; b=qQyVimi6nDX/cEYi2ONHAgd78dr5Vs3XgQp5pgCkSvJ0GRWaDkIqQ5ZA/MY51JTpwz VUpH50sa8382hBDOJrDJ07wbNEoa6ZqDK5BLJUVzrmCja/nSpZ51Xaz12fsy7fUjfvHf 7ZOT+yF4h6dTEsw9sHM+XMjErhFCGQDOnfTIk97+BQVmNd0wnz9fyN37bbI4B2aSVN9i r3HOYFF3xuu/pG9srNTUyGPBRkFqgI2WK4QvSejVNKakp4QeL6R3j4262/6FU0lD7nR3 T+77g9kgmCNdet/+BHasqCzkYOEkYq5lMNHgRUcbDVs8499IyhHWMpw68iFqW4wYYhDi ZMZQ== X-Gm-Message-State: AOAM5318/VHEXgIOUNe1m9ETK1tzhBkUH57s2Bayyi+r43XWcla7ELur 7wUxFdi+dxe/a+4nKdCrC1lh9Q== X-Google-Smtp-Source: ABdhPJyc9+eDO1CGDxgUH59DD0NvFmF86fqsXG/BFQSHEZOfQdlBImKkUBrkipZrTASU2mn/1UC7Mg== X-Received: by 2002:a17:902:f605:b0:14d:bd53:e2cd with SMTP id n5-20020a170902f60500b0014dbd53e2cdmr11211162plg.164.1653078217929; Fri, 20 May 2022 13:23:37 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id d7-20020a17090a2a4700b001deb92de665sm2331040pjg.46.2022.05.20.13.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 13:23:37 -0700 (PDT) Date: Fri, 20 May 2022 13:23:35 -0700 From: Stephen Hemminger To: David Marchand Cc: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@xilinx.com, stable@dpdk.org, Anoob Joseph Subject: Re: [PATCH 01/12] common/cpt: fix build with GCC 12 Message-ID: <20220520132335.6c4e457c@hermes.local> In-Reply-To: <20220518101657.1230416-2-david.marchand@redhat.com> References: <20220518101657.1230416-1-david.marchand@redhat.com> <20220518101657.1230416-2-david.marchand@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, 18 May 2022 12:16:46 +0200 David Marchand wrote: > GCC 12 raises the following warning: >=20 > In function =E2=80=98fill_sg_comp_from_iov=E2=80=99, > inlined from =E2=80=98cpt_kasumi_enc_prep=E2=80=99 at > ../drivers/common/cpt/cpt_ucode.h:2176:8, > inlined from =E2=80=98cpt_fc_enc_hmac_prep=E2=80=99 at > ../drivers/common/cpt/cpt_ucode.h:2475:3, > inlined from =E2=80=98fill_digest_params=E2=80=99 at > ../drivers/common/cpt/cpt_ucode.h:3548:14, > inlined from =E2=80=98otx_cpt_enq_single_sym=E2=80=99 at > ../drivers/crypto/octeontx/otx_cryptodev_ops.c:541:9, > inlined from =E2=80=98otx_cpt_enq_single_sym_sessless=E2=80=99 at > ../drivers/crypto/octeontx/otx_cryptodev_ops.c:584:8, > inlined from =E2=80=98otx_cpt_enq_single=E2=80=99 at > ../drivers/crypto/octeontx/otx_cryptodev_ops.c:611:11, > inlined from =E2=80=98otx_cpt_pkt_enqueue=E2=80=99 at > ../drivers/crypto/octeontx/otx_cryptodev_ops.c:643:9, > inlined from =E2=80=98otx_cpt_enqueue_sym=E2=80=99 at > ../drivers/crypto/octeontx/otx_cryptodev_ops.c:668:9: > ../drivers/common/cpt/cpt_ucode.h:415:36: error: array subscript 0 is > outside array bounds of =E2=80=98buf_ptr_t[0]=E2=80=99 {aka =E2= =80=98struct buf_ptr[]=E2=80=99} > [-Werror=3Darray-bounds] > 415 | e_dma_addr =3D bufs[j].dma_addr; > | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ > ../drivers/common/cpt/cpt_ucode.h:416:48: error: array subscript 0 is > outside array bounds of =E2=80=98buf_ptr_t[0]=E2=80=99 {aka =E2= =80=98struct buf_ptr[]=E2=80=99} > [-Werror=3Darray-bounds] > 416 | e_len =3D (size > bufs[j].size) ? > | ~~~~~~~^~~~~ >=20 > For now, waive this warning until we have a proper fix. >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: David Marchand =20 NAK Please fix properly, with something like: --- a/drivers/common/cpt/cpt_mcode_defines.h +++ b/drivers/common/cpt/cpt_mcode_defines.h @@ -387,7 +387,7 @@ typedef struct buf_ptr { /* IOV Pointer */ typedef struct{ int buf_cnt; - buf_ptr_t bufs[0]; + buf_ptr_t bufs[]; } iov_ptr_t; =20 typedef struct fc_params {