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 C6D14A034C; Sun, 19 Jun 2022 14:35:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62FEE4067C; Sun, 19 Jun 2022 14:35:55 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 36C3140223; Sun, 19 Jun 2022 14:35:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655642153; x=1687178153; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=NoIQw8V4LAbXIXvITj8x9UTcgRaM1wy+GBkU/9ANDvc=; b=B/nyTt8WFUvZJ4OGMvZLZfdfWAEQ4WhhdoAOHo9DK3BPjojqDih7wpsL 1vB4ARA/awWR2EhpAJ2hhgA6zDu0xsvPXBx2WwanFzUHLAWi3a9ljfgXg Roo9FYGEhvM0SClfglSOxzwblR5A9eXGWEq2svXbMRiDBGMG8gnSpETKL 5uisVNvgxUdFB60lFgCoCrRoFaSZwMipzag//xpSqacplecUQqH3T6FNm hvLaaEmbO4hibsUgFl8qKOAYricbWXgd7PAlpDitWY1c7uiU7lq5mbLQx 2BlBjnTUCnaP4Rjoz6SUdmolDlRe7IzxLZrcidlx8CMywKg0KOoBMUvgd A==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="305160415" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="305160415" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2022 05:35:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="729001300" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga001.fm.intel.com with ESMTP; 19 Jun 2022 05:34:58 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) 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 05:34:55 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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 05:34:55 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.176) by edgegateway.intel.com (134.134.137.100) 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 05:34:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iZVDHAgNFL8Z935qNT15ItPj/E6auOnUF5u2iRMnZ1nnicBTGCttsxvniKU60+ty5X3R+kB+xa4KB9YzE4KfX2K7v9YB18QCFVAjXFG6jU5KEhOhNAHJ36pP4EBycYkQ7VDrTogjL1A7YfXrhQs1G42yybcT1RsewHJw6hlqqPL2qRZbWUQtK6JkJMNI/pB6KCw4JRQuvMGa+4Y+HGBueKNOlF5c+vbuqCTu0m6wNg2ZRA54I3nFHi6qo3IkDSXdtt8NetVg987aQ8HpXTLVTR9+HKIdTV+y2/BqBI4BsrxYQSQ8VQzaAp45X3LnhYsp1OAJVABc5du7NrKYeFvlrQ== 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=3LF39oMfu+TfZjbfpXez8UzFp7RP/CDfkwsEl1+dR/w=; b=ebUV1H8ZAG2eyA/ziqbtLPexebThFjiFS1y36GDbUKdHneIJhGzqsifJ9yZu+KJ5KWa9ByKXo20wuuJWKukZo26zDlpD5yEsjfShgXRN8Nf7RqIG8wvrLGT1qX9EUcybgwCv9ItpC6R+uR8tD/kOQxmxENxmUnNoVj1aiqFq/5yoryLwq3Yj0h/aZOTTan2HFvSC6w5gk1NzJ8euJOY7mKZEmHB61rpdr4PxCH+hM2EJZ9CGcs0t3ChrNk59pzaGh+fuWU1fWR43LHR3BlxUZfsajsrvh20MLwO6Lb4MgCuWdN08vAgf8jPnr9lBBOG6Ffu93OCnxY2Nc2EWgK7ERw== 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 DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by DM4PR11MB6141.namprd11.prod.outlook.com (2603:10b6:8:b3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Sun, 19 Jun 2022 12:34:54 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::b4f6:f68:2e31:ddf7]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::b4f6:f68:2e31:ddf7%8]) with mapi id 15.20.5332.020; Sun, 19 Jun 2022 12:34:53 +0000 From: "Zhang, Qi Z" 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 Thread-Topic: [PATCH] ice/base: fix gcc 12 warning stringop-overflow Thread-Index: AQHYgWy7mQeNyEp1o0u91oa1i+laYK1WrEPg Date: Sun, 19 Jun 2022 12:34:53 +0000 Message-ID: References: <20220616103304.132368-1-wenxuanx.wu@intel.com> In-Reply-To: <20220616103304.132368-1-wenxuanx.wu@intel.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.500.17 dlp-product: dlpe-windows 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: dd2a99d3-5339-4128-392f-08da51f01c88 x-ms-traffictypediagnostic: DM4PR11MB6141: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: RYTF+po7H8ggI1vnlqBvTAebUabKKl+zzix3fnJEV8erkmQ0bh6vIZ3fp9L+0KdPiFbiHCBpxNEKcgq8M8tMmAgLcSQfdaWyccDv2wV5b3F084KpvKJ3ueFaWB/xgJdIESfpUJctKy5sDejp1HFSxmpVNalZUKDqKABOFyBQTiN2eNpXAN8eR0iYPf5/6m/w6TemXimoGNoJdCQh6dER7HiMy6vehY3CwOWgvQaNtOgLIKa5zcmOTa2+CTZBQR3mI0h6fylLnDiC8NV4Fw5OMWKfvsScAWdG/VfmK815S+0G78EwlSp2eDfbk/keUfWVePECduA1SipFWeLmLXDM35gtYguBInFXwMUQAjNx1HfElJyozRiPr1Hwv+2H0/5xAQJJNCeNjUbblTyqSZ70A0HUGGAPUKSlgmvGxi4DjObyT/XtTh7nUzDdv01GLxlWvEbmouqm5e9cyCc2hJxCDVpFDzvNeHqoweDhR5jt1k2kn7xKuHXJ9xxIj09xOuz30lEEdaYsZuhqmw0/bYh74+JeFrw75DZBgW4e01LlxctLCzmDA0IwEIf04uT0ucZf9f2webpGidy3Xukl1nWklFbXmLZEaM4pX38iFw9S9+4ysJP9I7IoGo6jXEXgwNAN/mfGBd+Sqw+M/h6/kTTJNpdu5Lgg+VeoICIGtrau1SsTuVULOzBWfrA2LNX+YvIlaqGsV/OAC9133ypWsaIaDQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(8936002)(2906002)(76116006)(55016003)(498600001)(52536014)(6506007)(316002)(82960400001)(71200400001)(66446008)(64756008)(66556008)(33656002)(83380400001)(4326008)(8676002)(86362001)(66946007)(7696005)(122000001)(110136005)(26005)(9686003)(38070700005)(186003)(38100700002)(66476007)(53546011)(5660300002)(54906003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2QoYMYfswEG9hhvVnxzQJYon2K8uEJVBq1fjpKnM3f7wrlyOGj8wyksvXJ++?= =?us-ascii?Q?FljFxb+9EdcxWeRcYM5jqOO1+/fWcW44VvpeCWX8dSH/NMmY9tKGpkGHsiu2?= =?us-ascii?Q?gZc9JgcePNYBVx5UiTXXaUpJT1aycBHEYQvgZvU19vgmbjiYC8KWeuNzJwu5?= =?us-ascii?Q?u2Tf9ckHyxUYsXb6RxZ3MlMd0eiB8GmT1j2K9OhFUvHwc9wCJEBTh8wa6rtm?= =?us-ascii?Q?U09hFe2k/eq/dOo/mrFz4NuilpsCCzogKcCngJpKJ7IhD27nICULG81h++W3?= =?us-ascii?Q?gFHtkVmNNqE3KxGafXGnbivwCKK30x4WJI73F/RRNkjO6eSAaf6CepPO/Llv?= =?us-ascii?Q?xb3k/oyqDHu/BOSap81i1QQQ3KzZmkKT+GdTp3thZt7/vUec7OFBdBGdhrjG?= =?us-ascii?Q?bJtfFFvo17sYo7juvdPdCpasOKfjYV5sb1jNa1YSgechPcIFbw1aQmqz+GpA?= =?us-ascii?Q?SYV+X/QZDt5sq4F/fhtJMOA35zERerM7X9QPoxZUXLYmtryWOsmT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dC2vxzutNAn0N810nK7YxLx9VpRhRxNUhykH?= =?us-ascii?Q?lGRa53LSJFEMnrlAb1lXVH3VGMi2oNgMpGlLoINfk3jcMaPbZJRv/h7hokDm?= =?us-ascii?Q?WGfNMnyevbp1NSO0HMG5UhgK9tfyTFg6htXOL/pZ4Fv6D+XzLEO4cI78CDcK?= =?us-ascii?Q?fop/xW6PZxHAX3Dygk/2nbvYact0k9Veb5Oq2CHNt/t/XkWcR5SRqE/UL1mU?= =?us-ascii?Q?9QHAw1HVHfAJngJHjfNsRKuXHluRPbf3QhMGMrNXqjmBplDrz7x/rd5+A3dZ?= =?us-ascii?Q?ZZrsPgbQJdG1V5cxBRx0HFKylmUlC5PcP85YKO1cunmHMn/0TZy0omgUuRWa?= =?us-ascii?Q?J9C2CCQpFA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd2a99d3-5339-4128-392f-08da51f01c88 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jun 2022 12:34:53.8880 (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: 3DR7Z96dcP41ICoSVBrOKo4IY7MXu+XPOMXrJBWLaBjntL+AE0HnemMpUi5CD9rDhe3hDtYx5IYg2n35OGNRCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6141 X-OriginatorOrg: intel.com 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 > -----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 >=20 > From: Wenxuan Wu >=20 > 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 ali= gn with > its callers which is also u8 type. >=20 > When u8 idx[5] =3D a value u16 index[4], gcc12 would give this warning, b= ecause > it is not big enough to store the bytes(bigger than 5 bytes) in one time = (-O2 > would do it in this way). >=20 > 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(-) >=20 > 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 a= lso change the type of all the symbols to store the same thing. e.g. the p= arameter "fv_idx" of ice_find_prot_off. So, what's exactly the issue that GCC 12 reported? can we fix it from the o= ther side without changing a type in the base code? > u16 fv_mask[ICE_NUM_WORDS_RECIPE]; > struct ice_pref_recipe_group r_group; > }; > -- > 2.25.1