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 AE735A0C55 for ; Fri, 5 Nov 2021 01:50:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EE9D41104; Fri, 5 Nov 2021 01:50:54 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id B06DB4014D; Fri, 5 Nov 2021 01:50:51 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10158"; a="219019942" X-IronPort-AV: E=Sophos;i="5.87,209,1631602800"; d="scan'208";a="219019942" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 17:50:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,209,1631602800"; d="scan'208";a="490164648" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga007.jf.intel.com with ESMTP; 04 Nov 2021 17:50:50 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 4 Nov 2021 17:50:48 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 5 Nov 2021 08:50:41 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.012; Fri, 5 Nov 2021 08:50:41 +0800 From: "Zhang, Qi Z" To: David Christensen , "dev@dpdk.org" , "Xing, Beilei" CC: "stable@dpdk.org" , "Yigit, Ferruh" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix gcc 11 build warning on POWER architecture Thread-Index: AQHXwS53Ln3vb71HBU+0bF98BzD+gav0Op+w Date: Fri, 5 Nov 2021 00:50:41 +0000 Message-ID: <6b454551353a409b8c5c661462b7d329@intel.com> References: <20211014190500.2657413-1-drc@linux.vnet.ibm.com> In-Reply-To: <20211014190500.2657413-1-drc@linux.vnet.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/i40e: fix gcc 11 build warning on POWER architecture 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 Sender: "stable" Hi David: Not sure if below patch also help to solve the issue you met on power arch= , Looks like the error is same: "writing 1 byte into a region of size 0" would you help to check? commit 1b0f3a18145468c309bb5a8cb98a8aa29af059e7 Author: Ferruh Yigit Date: Fri Oct 29 11:37:01 2021 +0100 net/i40e: fix build for 32-bit Got error with: gcc 11.2.1 "cc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)= " Build error: In function 'i40e_flow_parse_fdir_pattern', inlined from 'i40e_flow_parse_fdir_filter' at ../drivers/net/i40e/i40e_flow.c:3274:8: ../drivers/net/i40e/i40e_flow.c:3052:69: error: writing 1 byte into a region of size 0 [-Werror=3Dstringop-overflow=3D] 3052 | filter->input.flow_ext.flexbytes[j] =3D | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 3053 | raw_spec->pattern[i]; | ~~~~~~~~~~~~~~~~~~~~ In file included from ../drivers/net/i40e/i40e_flow.c:25: ../drivers/net/i40e/i40e_flow.c: In function 'i40e_flow_parse_fdir_filter': ../drivers/net/i40e/i40e_ethdev.h:638:17: note: at offset 16 into destination object 'flexbytes' of size 16 638 | uint8_t flexbytes[RTE_ETH_FDIR_MAX_FLEXLEN]; | ^~~~~~~~~ Fixing by adding range checks. Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FD= IR") Cc: stable@dpdk.org Thanks Qi =20 > -----Original Message----- > From: dev On Behalf Of David Christensen > Sent: Friday, October 15, 2021 3:05 AM > To: dev@dpdk.org; Xing, Beilei > Cc: stable@dpdk.org; David Christensen > Subject: [dpdk-dev] [PATCH] net/i40e: fix gcc 11 build warning on POWER > architecture >=20 > Building DPDK with a gcc 11 based compiler such as the IBM Advanced > Toolchain 15 (1) generates a stringop-overflow warning when using -O3 > optimization (DPDK default for production releases): >=20 > writing 1 byte into a region of size 0 [-Wstringop-overflow=3D] >=20 > The issue has been reported to the gcc project (2) but can be resolved by > preventing the compiler from unrolling the loop as part of the -O3 > optimization. >=20 > (1) https://www.ibm.com/support/pages/advance-toolchain-linux-power > (2) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102316 >=20 > Bugzilla ID: 743 >=20 > Signed-off-by: David Christensen > --- > drivers/net/i40e/i40e_flow.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c = index > e41a84f1d7..17ab7ad9b9 100644 > --- a/drivers/net/i40e/i40e_flow.c > +++ b/drivers/net/i40e/i40e_flow.c > @@ -3047,6 +3047,10 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev > *dev, > return -rte_errno; > } >=20 > +#if defined(RTE_ARCH_PPC_64) && defined(RTE_TOOLCHAIN_GCC) && \ > +(GCC_VERSION >=3D 110000) #pragma GCC unroll 1 #endif > for (i =3D 0; i < raw_spec->length; i++) { > j =3D i + next_dst_off; > filter->input.flow_ext.flexbytes[j] =3D > -- > 2.27.0