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 A20FBA0505 for ; Wed, 18 May 2022 12:17:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B15C42686; Wed, 18 May 2022 12:17:21 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 95E0D400D6 for ; Wed, 18 May 2022 12:17:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652869040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r1gzZPUhkD+PahiC0fyjQz11WzrBicMP3lZcF7ycEZM=; b=a/qsVLu5lEJGl3RMNzaYumdS6j3WqV9XdksiCqzbfjy57RldoWv82DLzhPVl1GHJu6KN67 IzWHqP5nWFOr7WgJKJ5Hhc3OTdox14ns2GtLkYuJyhbHmbZ1kFWgy0NQWSsPxJInaPpKht 6Zs5Wh6h8eNiP+5rc6cZAtFj3wVqHws= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-267-1EdqMOWDPvqWREaXTLIWKA-1; Wed, 18 May 2022 06:17:17 -0400 X-MC-Unique: 1EdqMOWDPvqWREaXTLIWKA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9FF5F800882; Wed, 18 May 2022 10:17:16 +0000 (UTC) Received: from fchome.home (unknown [10.40.195.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 120AC492C14; Wed, 18 May 2022 10:17:13 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@xilinx.com, stable@dpdk.org, Anoob Joseph Subject: [PATCH 01/12] common/cpt: fix build with GCC 12 Date: Wed, 18 May 2022 12:16:46 +0200 Message-Id: <20220518101657.1230416-2-david.marchand@redhat.com> In-Reply-To: <20220518101657.1230416-1-david.marchand@redhat.com> References: <20220518101657.1230416-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org GCC 12 raises the following warning: In function ‘fill_sg_comp_from_iov’, inlined from ‘cpt_kasumi_enc_prep’ at ../drivers/common/cpt/cpt_ucode.h:2176:8, inlined from ‘cpt_fc_enc_hmac_prep’ at ../drivers/common/cpt/cpt_ucode.h:2475:3, inlined from ‘fill_digest_params’ at ../drivers/common/cpt/cpt_ucode.h:3548:14, inlined from ‘otx_cpt_enq_single_sym’ at ../drivers/crypto/octeontx/otx_cryptodev_ops.c:541:9, inlined from ‘otx_cpt_enq_single_sym_sessless’ at ../drivers/crypto/octeontx/otx_cryptodev_ops.c:584:8, inlined from ‘otx_cpt_enq_single’ at ../drivers/crypto/octeontx/otx_cryptodev_ops.c:611:11, inlined from ‘otx_cpt_pkt_enqueue’ at ../drivers/crypto/octeontx/otx_cryptodev_ops.c:643:9, inlined from ‘otx_cpt_enqueue_sym’ 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 ‘buf_ptr_t[0]’ {aka ‘struct buf_ptr[]’} [-Werror=array-bounds] 415 | e_dma_addr = bufs[j].dma_addr; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ ../drivers/common/cpt/cpt_ucode.h:416:48: error: array subscript 0 is outside array bounds of ‘buf_ptr_t[0]’ {aka ‘struct buf_ptr[]’} [-Werror=array-bounds] 416 | e_len = (size > bufs[j].size) ? | ~~~~~~~^~~~~ For now, waive this warning until we have a proper fix. Cc: stable@dpdk.org Signed-off-by: David Marchand --- drivers/common/cpt/cpt_ucode.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h index e1f2f6005d..bdf72b400c 100644 --- a/drivers/common/cpt/cpt_ucode.h +++ b/drivers/common/cpt/cpt_ucode.h @@ -412,9 +412,17 @@ fill_sg_comp_from_iov(sg_comp_t *list, (bufs[j].size - from_offset) : size; from_offset = 0; } else { +/* FIXME */ +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 120000) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif e_dma_addr = bufs[j].dma_addr; e_len = (size > bufs[j].size) ? bufs[j].size : size; +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 120000) +#pragma GCC diagnostic pop +#endif } to->u.s.len[i % 4] = rte_cpu_to_be_16(e_len); -- 2.36.1