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 08813A0545 for ; Mon, 20 Jun 2022 07:06:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE04741132; Mon, 20 Jun 2022 07:06:13 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 6AA8C40150; Mon, 20 Jun 2022 07:06:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655701571; x=1687237571; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=huxMLTiRbFW05eA9rjuAHjWqNubsNDGApnt11ISMSdI=; b=ZiOSdifRc3/LywMbPxm1ui84TlxIbbSVrn/K3b620HTBKkiQzREkfvlZ F8cwrEdBGsySzxLIED7FlPQaHxmGBW/qcLLT9jMdV9F79KLq9rqEKWpBO CnjjUOogpBgumYGpQseZzpEE9m76Zx/62oTDYodjYmEEtAsNij2LiAUY1 suRF5ZYe/Esu9H57DFokC4v6vjp7ust617ptFzyJJJjVBXKU3L1B0URry fCChzs8d8qbYeWvaCVouxGw1VBHxXbBkDTmx4h9gq8eHTw7b0UenlvkTu 33ZrofdZ0ZyQ8FSTsrd2u2nTNxzZ4poZ2yDfn/ORbcfFmibLGydKlQ6YJ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="259624259" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="259624259" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2022 22:06:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="654500610" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga004.fm.intel.com with ESMTP; 19 Jun 2022 22:06:10 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 19 Jun 2022 22:06:10 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 19 Jun 2022 22:06:09 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Sun, 19 Jun 2022 22:06:09 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.175) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Sun, 19 Jun 2022 22:06:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k8S2L2XC8oIMd74+a30PqV+9Sde2vOazjgBkNbUh4yDOSQQEzcrIombFOUfg2XTdE3nBVgE8omHwokc7ZM7NmXN2sQUiDMTEx2IbXcPIvqVjKMr6M/Y27S2kExD1Oi33KPerDOZX4Tz2hBw80YfHpox1KAPm9d+24Q2maCXqB00zrVOqLkxbRqc2xXYm/l4oCexZwywOmy6a4tt4EP72uqsQXZ4pOXMCP2HRylXPxu5Eo6puH5ytk0LWXSiUnYVUinG34L5i+FBiL0Bq/Rx2G6sDnvOexwPQmrkx7aOKu2XT3iXTJFK4wYUy2UVnRcfksPuW2EzZWCFV6Qp3arlr/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+I/S1PBOoPVk5ZH8wHiNh7a7CwxFymyMSjOFJqhcB8Y=; b=jC4ElQc+2vg/aCq9MsQPjJJXfiNFq/8RwTjjCOGdf3NXSw31xAWZnEXSlL6cbmDgmu52PWWdbvIh7mDqQS6aQ/9XffuaUmMxdOshkOwcOp+QOTbL2U9S5V0XqO8qwiPDkcXs5yLDTO5ZGIBaltn1Rc6hFXzjUUIgFnh7jMx95+jk4iuLNx5qrjbIaUNC+1SZnEreLcaPw7r/3sWThiQN/8XUmocWqWTXB0T1IB56zqn1vyAfFyY8RieQ6Mk1PolrZpbZsZ+SU7MHg1eSn8SglsrDKYEFdC0YduwJe89yiKup5/CW4ngiLFg6Nbch0fu+X64gHEnEJsq75G03ToVewA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW3PR11MB4665.namprd11.prod.outlook.com (2603:10b6:303:5d::12) by BYAPR11MB2679.namprd11.prod.outlook.com (2603:10b6:a02:c7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.20; Mon, 20 Jun 2022 05:06:06 +0000 Received: from MW3PR11MB4665.namprd11.prod.outlook.com ([fe80::fdc5:978:be89:e4bf]) by MW3PR11MB4665.namprd11.prod.outlook.com ([fe80::fdc5:978:be89:e4bf%6]) with mapi id 15.20.5353.021; Mon, 20 Jun 2022 05:06:06 +0000 From: "Wu, WenxuanX" To: "Wu, WenxuanX" , "Zhang, Qi Z" , "Yang, Qiming" , "dev@dpdk.org" , "thomas@monjalon.net" CC: "stephen@networkplumber.org" , "stable@dpdk.org" Subject: RE: [PATCH] ice/base: fix gcc 12 warning stringop-overflow Thread-Topic: [PATCH] ice/base: fix gcc 12 warning stringop-overflow Thread-Index: AQHYgWy7AMx6waeLF0KZeDyQgZ7tI61WrxmAgADaUuCAADn/oA== Date: Mon, 20 Jun 2022 05:06:06 +0000 Message-ID: References: <20220616103304.132368-1-wenxuanx.wu@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6f9935ce-3a55-4e20-ad74-08da527a950f x-ms-traffictypediagnostic: BYAPR11MB2679:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JzknuNHot8p1Ac3dJ3Qd2gGuZZbF3mjHTaJ6ROBh9SdptJ+87kAOELh0q+/gFSt9nJwsgqfANU4VLFo0K4v9vhsVvHBAjaa557mbxBrZd+8OrYQTSg1agIcQgZx5HwzYBsBd9NqWo4XttVpL27ZolayaCCwOnE5k0+evzT34/ReyHE0oo+LCAHt3GwiTE8ptFXMXZB7ux2i0NjMO6D9rlri105wLAJ3NzzOojVrbLsQ170okYvL7Syj1M/remJGYTtWj1lf5gstPjFfymnddYyeBPfRpNjNXneLeQIsSH5AacHWNObJfRI/bJvhfgzQy+53/PGxyZg1LiJJv87VYequCl4+28TLjfvJKpjQVQNGzc1r/AN/OcNOdB2IBdNEi6t5fkbhX9nRPOrkQfeoc6FooPu9Se4ZLWAQtcaSDyGUqTXAogDIjYcLIBCObpwbPsO5AY1JD6efpYdiDOo8H5W4dZiloeH0GyArlmrUCB7/WGu376xsohHKOVzDE51AyTevVjN7D3VhgSumFWyh3L7XI9Ap4I4a9U7+ACBEAuUFr8uj6foz3CeD11jpI/mmYbYrncI07/pO+vZAdFVXEZITOOFrG/+WQFLpONzWsoDcU+1H0o3BQOaHRzDgkR+mVPuNk1ie9LveTTG1TsZ7SXDYLc9rUmBghxsOYl0nKQ4E6v9qXEfYTYMtTjAWTzIpDn0mQ5K/ANYyt4+EGm+QVGg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW3PR11MB4665.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(71200400001)(2906002)(55016003)(66556008)(8936002)(66446008)(64756008)(66476007)(5660300002)(8676002)(76116006)(66946007)(52536014)(4326008)(53546011)(316002)(6506007)(110136005)(498600001)(33656002)(7696005)(82960400001)(38070700005)(122000001)(86362001)(83380400001)(38100700002)(26005)(54906003)(9686003)(186003)(2940100002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?VXdEbEZuRC8xUHl1U0tvdGJBY1lDNk9BTkpoajlkTyt6bkFxSGpKcjl3?= =?iso-2022-jp?B?UWp1aG9Mc0NSdzVldTRlMU01VThpYXVmOVU4T2t1S2VxZnZWQlpsSDlp?= =?iso-2022-jp?B?U2IwZDV5eWhzL0dSYzlTKzBZcHNpZlF4UVpWclNHWDdpT09XL2YzMFQx?= =?iso-2022-jp?B?b1JtcndqbUFJNFZRWUVzUDJDa3NuaWp4elEyNENsTEtzU2JRZWR1R05V?= =?iso-2022-jp?B?MkJraWVyazA3UUU3dElmdUlZTzRkQ2ovZ21yRjd1TnhSV0t2YVU4clRL?= =?iso-2022-jp?B?TGczK0daMG92N2lmTXl5NStrNUZQVWt0TFYwUEZBWlNLaGdvdDZoLzlq?= =?iso-2022-jp?B?c0M5am9XdEpaeWZiOEhtOXAvL0N1ZjJ0bFl3RnA0QTBrTlJSa28vSlAx?= =?iso-2022-jp?B?am41M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hCWWxuVjI0MWVR?= =?iso-2022-jp?B?TzQxaTBkdVVMd0xDVURFYVNoeEQySGU0MW9OcUNCU0ZXOVlHaE1sVWZ4?= =?iso-2022-jp?B?WENFdGNRVjBsMFJ1VUNDbktXT1NMOURsb2JldTcvaWxCRWNaS1hVYzBE?= =?iso-2022-jp?B?bnA5cUlkUm5vOXNjV29sRkpCWVBzNXJnVE50U3EvUVBmQ2N2Uk9EMW5D?= =?iso-2022-jp?B?QjBiN2ZWYXJjNmI3MlVZUVMxMFZFaUdjUkRjLzY5TEtVRXpLNzMvTU1F?= =?iso-2022-jp?B?M0o3WHB3MHdoUVlUNHBsbExUelk0bmkvM2Z5UT09?= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW3PR11MB4665.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f9935ce-3a55-4e20-ad74-08da527a950f X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2022 05:06:06.6353 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Bo80CPvQdW/a6IwPkJDywCsjJswBug5cVFXvG0hG6pm3wbsAOaYcpXlcOBUgVDMIHGG/jCmkDKr1qa+4izor3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2679 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Wu, WenxuanX > Sent: 2022=1B$BG/=1B(B6=1B$B7n=1B(B20=1B$BF|=1B(B 9:39 > To: Zhang, Qi Z ; Yang, Qiming > ; dev@dpdk.org; thomas@monjalon.net > Cc: stephen@networkplumber.org; stable@dpdk.org > Subject: RE: [PATCH] ice/base: fix gcc 12 warning stringop-overflow >=20 > Hi all, >=20 > The warning below gcc 12 : > inlined from =1B$B!F=1B(Bice_add_adv_recipe=1B$B!G=1B(B > at ../drivers/net/ice/base/ice_switch.c:7951:11, > inlined from =1B$B!F=1B(Bice_add_adv_rule=1B$B!G=1B(B > at ../drivers/net/ice/base/ice_switch.c:8911:11: > ../drivers/net/ice/base/ice_switch.c:7220:61: error: writing 1 byte into = a > region of size 0 [-Werror=3Dstringop-overflow=3D] > 7220 | buf[recps].content.lkup_indx[i + 1] =3D e= ntry->fv_idx[i]; > | > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ > In file included from ../drivers/net/ice/base/ice_controlq.h:8, > from ../drivers/net/ice/base/ice_type.h:54, > from ../drivers/net/ice/base/ice_common.h:8, > from ../drivers/net/ice/base/ice_switch.h:8, > from ../drivers/net/ice/base/ice_switch.c:5: > ../drivers/net/ice/base/ice_adminq_cmd.h: In function =1B$B!F=1B(Bice_add= _adv_rule=1B$B!G=1B(B: > ../drivers/net/ice/base/ice_adminq_cmd.h:744:12: note: at offset 5 into > destination object =1B$B!F=1B(Blkup_indx=1B$B!G=1B(B of size 5 > 744 | u8 lkup_indx[5]; > | ^~~~~~~~~ > In function =1B$B!F=1B(Bice_add_sw_recipe=1B$B!G=1B(B, > inlined from =1B$B!F=1B(Bice_add_adv_recipe=1B$B!G=1B(B > at ../drivers/net/ice/base/ice_switch.c:7951:11, > inlined from =1B$B!F=1B(Bice_add_adv_rule=1B$B!G=1B(B > at ../drivers/net/ice/base/ice_switch.c:8911:11: > ../drivers/net/ice/base/ice_switch.c:7220:61: error: writing 1 byte into = a > region of size 0 [-Werror=3Dstringop-overflow=3D] > 7220 | buf[recps].content.lkup_indx[i + 1] =3D e= ntry->fv_idx[i]; > | > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ > ../drivers/net/ice/base/ice_adminq_cmd.h: In function =1B$B!F=1B(Bice_add= _adv_rule=1B$B!G=1B(B: > ../drivers/net/ice/base/ice_adminq_cmd.h:744:12: note: at offset [6, 254] > into destination object =1B$B!F=1B(Blkup_indx=1B$B!G=1B(B of size 5 > 744 | u8 lkup_indx[5]; > | ^~~~~~~~~ > In function =1B$B!F=1B(Bice_add_sw_recipe=1B$B!G=1B(B, > inlined from =1B$B!F=1B(Bice_add_adv_recipe=1B$B!G=1B(B > at ../drivers/net/ice/base/ice_switch.c:7951:11, > inlined from =1B$B!F=1B(Bice_add_adv_rule=1B$B!G=1B(B > at ../drivers/net/ice/base/ice_switch.c:8911:11: > ../drivers/net/ice/base/ice_switch.c:7220:61: error: writing 1 byte into = a > region of size 0 [-Werror=3Dstringop-overflow=3D] > 7220 | buf[recps].content.lkup_indx[i + 1] =3D e= ntry->fv_idx[i]; > | > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ > ../drivers/net/ice/base/ice_adminq_cmd.h: In function =1B$B!F=1B(Bice_add= _adv_rule=1B$B!G=1B(B: > ../drivers/net/ice/base/ice_adminq_cmd.h:744:12: note: at offset [7, 255] > into destination object =1B$B!F=1B(Blkup_indx=1B$B!G=1B(B of size 5 > 744 | u8 lkup_indx[5]; > | ^~~~~~~~~ > cc1: all warnings being treated as errors >=20 > Thanks > Wenxuan >=20 > > -----Original Message----- > > From: Zhang, Qi Z > > Sent: 2022=1B$BG/=1B(B6=1B$B7n=1B(B19=1B$BF|=1B(B 20:35 > > To: Wu, WenxuanX ; Yang, Qiming > > ; dev@dpdk.org; thomas@monjalon.net > > Cc: stephen@networkplumber.org; stable@dpdk.org > > Subject: RE: [PATCH] ice/base: fix gcc 12 warning stringop-overflow > > > > > > > > > -----Original Message----- > > > From: Wu, WenxuanX > > > Sent: Thursday, June 16, 2022 6:33 PM > > > To: Yang, Qiming ; Zhang, Qi Z > > > ; dev@dpdk.org; thomas@monjalon.net > > > Cc: stephen@networkplumber.org; Wu, WenxuanX > > ; > > > stable@dpdk.org > > > Subject: [PATCH] ice/base: fix gcc 12 warning stringop-overflow > > > > > > From: Wenxuan Wu > > > > > > Gcc with -O2 flag, would retrieve the value in one time. > > > This patch changed the type of fv_idx in struct ice_recp_grp_entry > > > to align with its callers which is also u8 type. > > > > > > When u8 idx[5] =3D a value u16 index[4], gcc12 would give this > > > warning, because it is not big enough to store the bytes(bigger than > > > 5 bytes) in one time (-O2 would do it in this way). > > > > > > Fixes: 04b8ec1ea807 ("net/ice/base: add protocol structures and > > > defines") > > > Cc: stable@dpdk.org > > > Signed-off-by: Wenxuan Wu > > > --- > > > drivers/net/ice/base/ice_protocol_type.h | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/net/ice/base/ice_protocol_type.h > > > b/drivers/net/ice/base/ice_protocol_type.h > > > index 0e6e5990be..cfe3b62630 100644 > > > --- a/drivers/net/ice/base/ice_protocol_type.h > > > +++ b/drivers/net/ice/base/ice_protocol_type.h > > > @@ -421,7 +421,7 @@ struct ice_recp_grp_entry { #define > > > ICE_INVAL_CHAIN_IND 0xFF > > > u16 rid; > > > u8 chain_idx; > > > - u16 fv_idx[ICE_NUM_WORDS_RECIPE]; > > > + u8 fv_idx[ICE_NUM_WORDS_RECIPE]; > > > > If you change the data type from u16 to u8 for the FV index, you'd > > better also change the type of all the symbols to store the same > > thing. e.g. the parameter "fv_idx" of ice_find_prot_off. > > So, what's exactly the issue that GCC 12 reported? can we fix it from > > the other side without changing a type in the base code? change from u8 lkup_indx[5] to u16 lkup_indx[5] can also resolve th= is issue.=20 > > > > > > > u16 fv_mask[ICE_NUM_WORDS_RECIPE]; > > > struct ice_pref_recipe_group r_group; }; > > > -- > > > 2.25.1