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 E0ADAA00C4 for ; Thu, 6 Oct 2022 08:31:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD0EE4284D; Thu, 6 Oct 2022 08:31:27 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 2FBF2427F5; Thu, 6 Oct 2022 08:31:25 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2964cC5Q031544; Wed, 5 Oct 2022 23:31:21 -0700 Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2048.outbound.protection.outlook.com [104.47.73.48]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3k1d7gjds4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Oct 2022 23:31:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bboNSrehQPflkLkvaImnDUzJeAvVjuoxjwlbZuimiAlNaRawWFAeFPcTs5tgEa9i7vvo5SRkvKn12OdbSmZfV+ZPZf3iBm6dmEmVmmxpcNAp/XvjIHM5SVVoonUGEhu8B9WDMSf19hXe3wj8N9MQWTZHmQbg78hVbvxd9yO0Hz69HpAa4CDmNgX3zN0A8by7R+AHr8m2iN8Y9aLuldU/8XTuaHz0CIv500RP5TXsyk9cDKzdK7CJEuzsAmi22GU7r5zPvDkE8Fn4ApwCUkMrUXp/wkT/rHGn8OK8AIpdBrwxRi6IvAf5qcauS27xRg4fepKLP+NELQO/mXdu6teTVA== 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=WFo91HcNCzWYxZBc+ME1692ePm9lFnxui5dLmU8p/Q0=; b=bOjEXyIAPeGada4vF/pKwrzqv/muHGwoaPsVLM70CzyYJT0n+jnXJ2n+vkcwW87mcH0J+c/eGs5ZAsEZB4fSueCQgSTfZW8gVs7F2NnVynasoFsic2IWXrTF3wof0yqkQYFv71kYyTu7eHRxcdndlRoSxDCJoACM6p/ftplvNc3X9x5f7H9htjX5nbozc+kYY8vABgS37cJRfjdwueBIFjFoyhMT3jPNHjJ7Nxs6GxL++ix20FxwkZn86dFV93eoaw2wS+MohEVULwt8OS+y1H5Gh2tSSLE5ik9+SrlX2vOED2oKwVDCvv4rwPJlA0FT+3aoGUFZa7jicnTD3HZX6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WFo91HcNCzWYxZBc+ME1692ePm9lFnxui5dLmU8p/Q0=; b=ojW+cX6w9flLg0CtxEbgX97/nORYPiKKyhH90v4Bmh3AVerYwRsbGysg3ulyC/sSZmYt5D0dk+wYyoIYdh1eaw1qSO0ZQudiRKSilcaaGnseqCILPgWq5SROLoqZWGHg3++DZ5V2DMEg0UTLLg9X0Z8NtN3FCaA+QNgj6EDELfo= Received: from PH0PR18MB5167.namprd18.prod.outlook.com (2603:10b6:510:168::7) by PH0PR18MB3800.namprd18.prod.outlook.com (2603:10b6:510:29::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.36; Thu, 6 Oct 2022 06:31:19 +0000 Received: from PH0PR18MB5167.namprd18.prod.outlook.com ([fe80::39e7:fb99:16b:c1a6]) by PH0PR18MB5167.namprd18.prod.outlook.com ([fe80::39e7:fb99:16b:c1a6%3]) with mapi id 15.20.5676.030; Thu, 6 Oct 2022 06:31:19 +0000 From: Amit Prakash Shukla To: Amit Prakash Shukla , Ruifeng Wang CC: "dev@dpdk.org" , Jerin Jacob Kollanukkaran , "stable@dpdk.org" , Akhil Goyal , "stephen@networkplumber.org" Subject: RE: [PATCH v2] examples: compilation fix for GCC-12 Thread-Topic: [PATCH v2] examples: compilation fix for GCC-12 Thread-Index: AQHYvp+80963bslGpkigBmAN3p17K64BHBPw Date: Thu, 6 Oct 2022 06:31:18 +0000 Message-ID: References: <20220901082343.3074804-1-amitprakashs@marvell.com> <20220902074337.3129786-1-amitprakashs@marvell.com> In-Reply-To: <20220902074337.3129786-1-amitprakashs@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB5167:EE_|PH0PR18MB3800:EE_ x-ms-office365-filtering-correlation-id: e00004cc-0530-4a27-f641-08daa76460da x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0kE4WM0tZFcqHlgx1FapaHfVmE0ZLjRKmf/V7u1gcOc7AMvUTUnaFRikw9ly5fTnYyLBQ9V2BUgvynVsvvQjGiG2k0YP8YTWvScVq5qCIN8l8foKlmRyCNVaybjeuPBRqWUHCIO4IVy/3S+fEFEi2x7t5ow+yHE+RqkPz5Vcf+TCWOmkDjRoK8rdpPQhG7+PzCWjxgNmVe3LrYn11nA1ZPflJErX3v31KtG4/Ttp0XP6OEcTQ3amneprto0Wdu0jIkJ6adKkg/ihmanVvh488CJdCJj0QrOL5sJplMHvcuVYDo/OKX/eDHMEyPLiDM+4fJ7HNNA5auuVx39bAJA7YJIZTUvTP+F1trbHJuq/qcf+eowLLPZGLtAXKyxaHV/NtKaCaMH8NSxvqcNQgTjvMH4OKjmZQqnNoiAueYAm/bGIZKRVHDYXDIGLk+kPjRJmadgNb15Yg9mED0iQvukwj8G/d3cMVDdd20SFXf0MUnLWjIkuJoTEjt6XwgWa2mjhk5D5lcg1KpRAu3RdgH4ycLS2UEkhRXtBo++MHbRl602rEPmCRvHtvN6kSe/6D6tMuBDVst5mLMCpzlBlCC7r0QkMSPrA22OqhUCvOZjUaPyK+RlYT+AKBd9sbCSOpPttDiK1DsFfAivngrYcLXhZ0wsy6vzwplMGKUGymUAWa7OOurwd1K4/qrLL0jdjdEGN6XJzeMlCIRXXn5/e3cla2Mhm69EhmXuTGrfudX3wumJu9qvMtXMEasOmQ0WGIDYZFh+p3GNGWxfLEclLd3LViQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB5167.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(396003)(366004)(376002)(39860400002)(451199015)(33656002)(86362001)(110136005)(38070700005)(122000001)(38100700002)(186003)(83380400001)(41300700001)(26005)(9686003)(71200400001)(7696005)(6506007)(53546011)(478600001)(54906003)(316002)(66946007)(76116006)(66556008)(66476007)(66446008)(64756008)(8676002)(4326008)(52536014)(8936002)(5660300002)(2906002)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2lDm754QZNG1XuHH8uR4IRsDdkcihULav3aLS0Mr/Egq7z7uPrixukYbdgDN?= =?us-ascii?Q?L19UHWuJs2698DFwSU1CI+RxwBIOeAZzMGJujT3s1ctmSYpE6wVcwxl1gkPY?= =?us-ascii?Q?ipyZuWBkUACu1L08kEwy/6LyTIG3UqZIcGvUas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iY2HP5+w9Ns8WX5zWMHVC0GH0CAvA6Os/yqmzDZG1dy2emHbF9L?= =?us-ascii?Q?qSzPeoe3g+GnxsEG6cEmCwnATpuB6HvQhbfvZLtHwRNXbOHN5eLXcIW5QlLk?= =?us-ascii?Q?9FYDzegqLkh11LMNO0XkLj69xsZ6Fz+4kCrUYHSO1QcReJoJ+8EbccWQrSqp?= =?us-ascii?Q?2ZKABHit2Jnrt1+FJfoeRzz5nZtsOf9JLelxIKvDBr0khHm2r89ReS0c00HG?= =?us-ascii?Q?Yb45hiqDuJd2ZH7nWP43P2MT7MUFiMl2RnXuFI6pktAR9VAiEoYy431paMnB?= =?us-ascii?Q?iwfyCSBxiFuGtvnSyEMdrDwQF4WK2F+61m+6xoj/tVDR753NsfM7U25EJwGh?= =?us-ascii?Q?nXys8jy+k9ggnzmz6MzASZ6FuW5WNJ/kCaz7jvDPMY16gQEKVagydyYxjlTk?= =?us-ascii?Q?QtmwJHaYxGd7hlZoAbI+PGttog/LMjBcRd3vP9jiNfn6FURC4tY0P9W9mzZZ?= =?us-ascii?Q?LveAQsyfAqvcbvx8VIsrE7OhEuyFssDOl1qv2T7yjbqQivXOY7jOyXpldiWr?= =?us-ascii?Q?NWqY8ZwQexDnAgYAdqL4qxWNkqnmdOAFcbp8Siwt?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB5167.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e00004cc-0530-4a27-f641-08daa76460da X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Oct 2022 06:31:18.9408 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: nM92qy4xVcDX6yymLam3ArwNgHlxo4KW+6hsy7U5bp6JHCzNwXi5f5hz7w9ATOU4pDSizQYlr25lsQeN+QvrxzgUEFh0BTj09XqB/FJ5FDM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB3800 X-Proofpoint-GUID: wg0fu-ahgPQaOdTJkPYbb-mok42rv8I8 X-Proofpoint-ORIG-GUID: wg0fu-ahgPQaOdTJkPYbb-mok42rv8I8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-05_05,2022-10-05_01,2022-06-22_01 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 checkpatch complains about coding style error. It looks like a false positi= ve ?=20 Please suggest. Thanks, Amit Shukla > -----Original Message----- > From: Amit Prakash Shukla > Sent: Friday, September 2, 2022 1:14 PM > To: Ruifeng Wang > Cc: dev@dpdk.org; Jerin Jacob Kollanukkaran ; > stable@dpdk.org; Akhil Goyal ; > stephen@networkplumber.org; Amit Prakash Shukla > > Subject: [PATCH v2] examples: compilation fix for GCC-12 >=20 > GCC-12 warns when a pointer of type union points to an array of same > defined size, as union internally gets paded with pad bytes. >=20 > ../examples/common/neon/port_group.h:42:21: error: array subscript > 'union [0]' is partly outside array bounds of > 'uint16_t[5]' {aka 'short unsigned int[5]'} > [-Werror=3Darray-bounds] > 42 | pnum->u64 =3D gptbl[v].pnum; > | ^~ > ../examples/common/neon/port_group.h:21:23: note: object 'pn' of > size [0, 10] > 21 | port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t d= p1 > | ~~~~~~~~~^~~~~~~~~~~~~~~ > ../examples/common/neon/port_group.h:43:21: error: array subscript > 'union [0]' is partly outside array bounds of > 'uint16_t[5]' {aka 'short unsigned int[5]'} [-Werror=3Darray-bounds] > 43 | pnum->u16[FWDSTEP] =3D 1; > | ^~ >=20 > Fixes: bdfc3816fbfc ("examples: common packet group functionality") > Cc: stable@dpdk.org >=20 > Signed-off-by: Amit Prakash Shukla > --- > v2: > - Changed to __rte_packed instead of direct attribute >=20 > examples/common/neon/port_group.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/examples/common/neon/port_group.h > b/examples/common/neon/port_group.h > index 82c6ed6d73..04e5699f70 100644 > --- a/examples/common/neon/port_group.h > +++ b/examples/common/neon/port_group.h > @@ -24,7 +24,7 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, > uint16x8_t dp1, > union { > uint16_t u16[FWDSTEP + 1]; > uint64_t u64; > - } *pnum =3D (void *)pn; > + } __rte_packed *pnum =3D (void *)pn; >=20 > uint16x8_t mask =3D {1, 2, 4, 8, 0, 0, 0, 0}; > int32_t v; > -- > 2.25.1