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 64B4DA00C4 for ; Thu, 6 Oct 2022 11:51:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E63642BEA; Thu, 6 Oct 2022 11:51:23 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id D0DF742BCC; Thu, 6 Oct 2022 11:51:20 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 35C01320090C; Thu, 6 Oct 2022 05:51:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 06 Oct 2022 05:51:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1665049877; x= 1665136277; bh=e6jy/zmKoANciYw0wX15ZEOP3fY17/GeAAD4mb0NbuI=; b=F EnYRp7gL6YcKM+6qtfzXSbjwFnE+Y8YYXQYc6PgaT8CZQmFZV6N7VF3m5oPJga4F bxoy288bPWV5KdCZyxfylcBE0C3Lk2ix7qEosSRD7kC7C8BQIjr4xGxQ+2XeGf85 uXmBXChfgZgTyF1DE/WJot+71rhYkBTWlqWM0dTVfUM/O7JDz/854ID7cj80psol aAPVLTWygCY3ILbkidZ135QKt3CUVYjVpHkxeTW4OJpxNGM30t3Qd3fsN8bOwT7i UkJuLvqZbpEn4YPII8+HRB7y789Al3lmYQoO6NebC96pHqCrmzExMWAbLZHNs8fB AG34+MdvcaFYg3rxnWLag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1665049877; x= 1665136277; bh=e6jy/zmKoANciYw0wX15ZEOP3fY17/GeAAD4mb0NbuI=; b=l HQUrSIfcQfLTV+AccNpo6zVi5aZfkcTYhIxXEacAUkNWS9pS0VSIPrF13YMl+O3b 6LO9TYcv2q/eMTTeaAsIOU2HtD93R42syyUvX1Kl96Kh3HZvx2/udS8SEp/Pfxsw 1XlFcVAk0nGOVJUcYnaHcy4NB3aFzFCAT949T7qWxpWwEkN1tZsNTVIofQ2QWW5P zZhN7utszs6ti977CMLRKTBBuj/XbLVChP8YPtjopN3vT/ZrlxRp0YBfWCW4E7QA al5t22nkwawpVSvNU9GbpXNgTWn/NRRlVw7gk91QL3V2EvY0ohrKXXINkWiOQm7y LUlxAkGzlpSsJk+URVzSg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeihedgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeegtddtleejjeegffekkeektdejvedtheevtdekiedvueeuvdei uddvleevjeeujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Oct 2022 05:51:16 -0400 (EDT) From: Thomas Monjalon To: Amit Prakash Shukla Cc: Yuying Zhang , Beilei Xing , stable@dpdk.org, dev@dpdk.org, jerinj@marvell.com, stable@dpdk.org Subject: Re: [PATCH 1/2] net/i40e: compilation fix for GCC-12 Date: Thu, 06 Oct 2022 11:51:15 +0200 Message-ID: <1833207.CQOukoFCf9@thomas> In-Reply-To: <20220824140339.2581716-1-amitprakashs@marvell.com> References: <20220823105742.2276506-1-amitprakashs@marvell.com> <20220824140339.2581716-1-amitprakashs@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 24/08/2022 16:03, Amit Prakash Shukla: > GCC 12 raises the following warning: >=20 > meson --werror --buildtype=3Ddebugoptimized > --cross-file config/x86/cross-mingw -Dexamples=3Dhelloworld build > ninja -C build >=20 > In function 'i40e_hash_get_pattern_type', > inlined from 'i40e_hash_get_pattern_pctypes' at > ../drivers/net/i40e/i40e_hash.c:520:8, > inlined from 'i40e_hash_parse_pattern_act' at > ../drivers/net/i40e/i40e_hash.c:1147:9, > inlined from 'i40e_hash_parse' at > ../drivers/net/i40e/i40e_hash.c:1181:9: > ../drivers/net/i40e/i40e_hash.c:389:47: > error: array subscript 53 is above array > bounds of 'const uint64_t[53]' > {aka 'const long long unsigned int[53]'} [-Werror=3Darray-bounds] > 389 | item_hdr =3D pattern_item_header[last_item_type]; > | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ > ../drivers/net/i40e/i40e_hash.c: In function 'i40e_hash_parse': > ../drivers/net/i40e/i40e_hash.c:182:23: note: while referencing > 'pattern_item_header' > 182 | static const uint64_t pattern_item_header[] =3D { > | ^~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors >=20 > Fixes: ef4c16fd9148 (net/i40e: refactor RSS flow) > Cc: stable@dpdk.org >=20 > Signed-off-by: Amit Prakash Shukla Sorry I did not notice this patch and I recently submitted one which I will abandon. It seems there was no reply from i40e maintainers after 6 weeks, but I will apply anyway. I will use my commit message: net/i40e: fix build with MinGW GCC 12 =20 When compiling with MinGW GCC 12, the rte_flow_item array is seen as read out of bound: =20 net/i40e/i40e_hash.c:389:47: error: array subscript 50 is above array bounds of =E2=80=98const uint64_t[50= ]=E2=80=99 {aka =E2=80=98const long long unsigned int[50]=E2=80=99} [-Werror=3Dar= ray-bounds] 389 | item_hdr =3D pattern_item_header[last_item_type]; | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ =20 It seems the assert check done above this line has no impact. A real check is added to make the compiler happy. =20 Fixes: ef4c16fd9148 ("net/i40e: refactor RSS flow") Cc: stable@dpdk.org