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 B9379A0505 for ; Wed, 18 May 2022 12:17:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A88C542B74; Wed, 18 May 2022 12:17:32 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id A07B842B6E for ; Wed, 18 May 2022 12:17:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652869049; 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=ejUhMeQFqmngUgfCLS2z8WN0CMQF8urs4BnEDBdkFOw=; b=M2uLpvx3LKpwH6DfHMTAmDGXmmIPD4yF6unr/r7052B/JXMSatZVBEHRqHu2QF6gHQnPkv hL+TByZYTPTIDCDyu7tx0wEY374QolXIfjFR/e6YZPjqPHQwoOy3v4vr3wyz6Wqd+k/5al hhJQECBBflkXrCvdBFERr4TamCOBLVY= 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-620-PYj_0cdfNViRtx72D5jEkw-1; Wed, 18 May 2022 06:17:26 -0400 X-MC-Unique: PYj_0cdfNViRtx72D5jEkw-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 6DE2B811E78; Wed, 18 May 2022 10:17:25 +0000 (UTC) Received: from fchome.home (unknown [10.40.195.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 28357492C14; Wed, 18 May 2022 10:17:21 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@xilinx.com, stable@dpdk.org, Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj Subject: [PATCH 02/12] crypto/cnxk: fix build with GCC 12 Date: Wed, 18 May 2022 12:16:47 +0200 Message-Id: <20220518101657.1230416-3-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 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@dpdk.org Signed-off-by: David Marchand --- drivers/crypto/cnxk/cnxk_se.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h index ce7ca2eda9..c9d147601f 100644 --- a/drivers/crypto/cnxk/cnxk_se.h +++ b/drivers/crypto/cnxk/cnxk_se.h @@ -205,8 +205,16 @@ fill_sg_comp_from_iov(struct roc_se_sglist_comp *list, uint32_t i, 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_vaddr = (uint64_t)bufs[j].vaddr; 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