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 7BC8FA0543; Tue, 4 Oct 2022 13:22:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D42140DFB; Tue, 4 Oct 2022 13:22:00 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 65CFC40DDC for ; Tue, 4 Oct 2022 13:21:58 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 16A425C0184; Tue, 4 Oct 2022 07:21:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 04 Oct 2022 07:21:58 -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=1664882518; x= 1664968918; bh=EMmCCse3zxGwvVyo71RUF8v2H63iTSTAM/EXaH3NukQ=; b=C 2IqAPgqxf1Dc0SqZ0Dc7B0IeKKcpzGd4jJ6Xjxlm+thwRKUgszp4bAtEyFZTwlxm WJagyEwSmkzWVQNl7T2QaS3FzJbcibY2+xRAav2dQlXmkwKhc5jtduUL2nkkrQRW kH8HvQhRzKppDAnxmqI1q0QhyYCdNwwJ2kKxd1VqCS4UX5EIcQwVJdAboJH/sk7n r/r3hRfr8FWgVs3g4MsKGiVis6pGcssCBY1AD9ynUroHOP10aLa7u4qlDKvzV9tU KsnJYv7OwV1tGxZXLhQg59I/INgjdlcb9s//SMwyz+e6+B/b6nSfLm15K7gcFF2z +mRHXg5FUGTxHEngJ8mEA== 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=1664882518; x= 1664968918; bh=EMmCCse3zxGwvVyo71RUF8v2H63iTSTAM/EXaH3NukQ=; b=o AjGjpIGHOrJ7cDNVPE4yT3qXcFtpKH/PwK3dqub0SW2n+wG415SinnYcs3cw0v6A kK7VogrzAkP2tFe7H5PAAh7mZG5MRomKJ24v8g1wQDws+HPIRZ233ThLNwbEADHk noy2jWsbcTepGySkmL/w4HhilD65cT2Z6f35u5lZ88ePAsy+8ZMDD5gjm2RQjVH+ h1ogpNy+NB3rx8M3uON4287K/tvpCNjhi6I40uWTI6vR4/oe3KlcH+6CugpDwEwR hke+T4dszEgSQ87PsRUxAaLoHebwSunVrgIVPE+ToOMabZldXZmZeXYiyA5yNpZx 5SgfFiIu9QdPufxlW5eUw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeiuddggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeegtddtleejjeegffekkeektdejvedtheevtdekiedvueeuvdei uddvleevjeeujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 Oct 2022 07:21:57 -0400 (EDT) From: Thomas Monjalon To: Yuying Zhang , Beilei Xing Cc: dev@dpdk.org Subject: Re: [PATCH] net/i40e: fix build with MinGW GCC 12 Date: Tue, 04 Oct 2022 13:21:56 +0200 Message-ID: <2673690.9PvXe5no7K@thomas> In-Reply-To: <20221004111742.1497105-1-thomas@monjalon.net> References: <20221004111742.1497105-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 04/10/2022 13:17, Thomas Monjalon: > 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=3Darra= y-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 check is added to make the compiler happy. We could add those lines as the real issue is the item array: =46ixes: ef4c16fd9148 ("net/i40e: refactor RSS flow") Cc: stable@dpdk.org > Signed-off-by: Thomas Monjalon > --- > drivers/net/i40e/i40e_hash.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_hash.c b/drivers/net/i40e/i40e_hash.c > index 8962e9d97a..ba616aea9f 100644 > --- a/drivers/net/i40e/i40e_hash.c > +++ b/drivers/net/i40e/i40e_hash.c > @@ -386,6 +386,8 @@ i40e_hash_get_pattern_type(const struct rte_flow_item= pattern[], > prev_item_type =3D last_item_type; > assert(last_item_type < (enum rte_flow_item_type) > RTE_DIM(pattern_item_header)); > + if (last_item_type >=3D RTE_DIM(pattern_item_header)) > + goto not_sup; > item_hdr =3D pattern_item_header[last_item_type]; > assert(item_hdr); > =20 >=20