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 48B5AA0560; Mon, 17 Oct 2022 14:05:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8F4440A84; Mon, 17 Oct 2022 14:05:56 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 705C14021D for ; Mon, 17 Oct 2022 14:05:54 +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 29GNeC9O002863; Mon, 17 Oct 2022 05:05:53 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2177.outbound.protection.outlook.com [104.47.55.177]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3k7vcp5yhu-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Oct 2022 05:05:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h9139+LE9BZVQvlju4d5tMZ6ioq/y7vPYpXGbSdb4KNn2v6xUFWqA4iUIJuEzL7u9kl98p0Vx9VWj6dXDzGQzPmiJXGtndECZu89nJBct5Y88FSODMhYs8S+oiUp5tDqmOvsdWmMdS/G8Bv1JfSN1OkObWF2RqB/6pwNX57ZvgMiPHQrlMBS/O8QXuOkAc4Cchoiqo4WJo9XKPmNkTolX6Y5z2ezNp9/9I/23e0Zfw/a8do3nyN0Qf1NYpbay1pYqTDQb6HWbrG3QtlrATxaoOcx/AchBqTW5WrpeH2ck8G6k/935qHIYZL6EuN5hHSlN5Pmnj0buGPFj0gpSqIkCQ== 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=n15Wh8BcqwEa3ON+bKiw7IZHPay9qnJ0F5+uj6iiR0E=; b=L9uSCFkexCuBTXuJXS6FB8Uv+G/VefSCUHV7dvrD/W6d/1C7jlSKl+wC/AeNABd40YVwCGR5XQD3Eid5Bnlv0dY/TAhlLxye4Erf0l+YwRgCxuyBNlMdKO3hrVTXnYBAxq/ZdXciUJTUjdCuVOK+fsIjTmGDVMdOoGFescDqq+Cqxu+XmoNJRHTPh8F8AJtUvHQsvpQPdk6KLNg8cxbvP+5yxoIpjJY5VC4jyMG23Lu9poAHPnVnDgMA2RSlq2LSpjGckiaVIHMZkTeYz0gTbJfpHZfLfIpP1ZZa6ZXvOhge82iJLEgUhyml1QlepvrV68OzzBHzsafwl48UCPZhLQ== 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=n15Wh8BcqwEa3ON+bKiw7IZHPay9qnJ0F5+uj6iiR0E=; b=R560oCWZ7dIVTjMOnPRwtQ9Nv9ojy0Os2yIg7W2y5R0SKOJeZNVHLreW9nAi88UoQ+3lT2IiicfmtVYugNIcEHadbj5VynppI7RvqlKNDO7C31DGnW5aUYE/38KfWVC9RSbbiMDVNjlGOxFJL4hgVQwX2H4BP8rqPzH8Cpbg+DI= Received: from PH0PR18MB4425.namprd18.prod.outlook.com (2603:10b6:510:ef::13) by SN7PR18MB3837.namprd18.prod.outlook.com (2603:10b6:806:101::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Mon, 17 Oct 2022 12:05:49 +0000 Received: from PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::16f8:9275:a441:cfec]) by PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::16f8:9275:a441:cfec%6]) with mapi id 15.20.5723.033; Mon, 17 Oct 2022 12:05:49 +0000 From: Shijith Thotton To: Pavan Nikhilesh Bhagavatula , Jerin Jacob Kollanukkaran , David Christensen CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula , "stable@dpdk.org" Subject: RE: [EXT] [PATCH v5 1/5] examples/l3fwd: fix port group mask generation Thread-Topic: [EXT] [PATCH v5 1/5] examples/l3fwd: fix port group mask generation Thread-Index: AQHY3VnwxbYU/ObpTkWj3tQzZ+MyeK4ShqtQ Date: Mon, 17 Oct 2022 12:05:49 +0000 Message-ID: References: <20221011090805.3602-1-pbhagavatula@marvell.com> <20221011101207.4489-1-pbhagavatula@marvell.com> In-Reply-To: <20221011101207.4489-1-pbhagavatula@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: PH0PR18MB4425:EE_|SN7PR18MB3837:EE_ x-ms-office365-filtering-correlation-id: afa98cce-6a3c-49af-e768-08dab037ee66 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KkraO2dNCIBUg9mvLSIVCc9ZuxoPXiO9jQ2a8rqkHRuyNWoHgWmdmHfb7e6dEOTwtZuwdM0AkCHGwi0BxttApvSvS+IaefHR/VKirWg2M7EgZtnnJ6uTHMEUPQCX3dTakUc0EXesB3eYA3YXlmcQhaJPT/HZhUChHyD17/5uj4C3iRcAysJzWa6nQFPzLyIOqKOWVgFQpC250vEU/87aLoMnnWcfGc6qAAyAvVZmN8MV+Mk1UwOEm/EwtC574g1nk4sKcaagVoanJMQxeYl27a+gBneQ4mWkNgyddpL8koihkjfx2y/pfd5jMcZt22NMSgSMoUTICOJBIJZWwI8wlOHHNFFmwfpxQt6qXfhCaRTDMmevCRAK35nkmu2PAN+ym6CAZVJW1HQ1ONpdTByWjW+aFZJa8tVGb/ODkyiFV4afQm9dzwm5bt1CWohzh4DwIMaeWoOstB/qE5oDiZEWPewAlmR2R7XakbbW/JEYZgl/goMJdJcOWX2ZLGbXI5NXQH9+I+ELkwwRUcdu+ZBA0xzzU2wTcnMDkQ907BeD/6USXvQPkZLCMgbjL2srH5DBxHXa/0ZR8aXhMTUbKzqG62pujTUpJ4oMpGl9sSHnMI75L2aGSj/Os9Ty/RlTtAnoRaJFHyrADmnDRxa703V7wTu0Pe/ebBFvworGaXlkp6KMKx8qgFccXbBHMJ2W7BWuHmeg9ELlLme7tSJnaE3gHxKp0ukJwOG7pl7yrMJUzn3YhOv5iGWVDLUlZ41f2JBVKiQBtD8I5X7E4C9l/iQ5vw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4425.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(396003)(39860400002)(376002)(366004)(451199015)(33656002)(86362001)(122000001)(5660300002)(2906002)(38100700002)(186003)(54906003)(71200400001)(83380400001)(38070700005)(26005)(7696005)(6506007)(316002)(478600001)(9686003)(66556008)(66476007)(66946007)(110136005)(76116006)(66446008)(52536014)(8936002)(41300700001)(55016003)(4326008)(64756008)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mxWtPk6zUIIH1G/SoAeN/vKze1cT6Ha875fKhyicj1QxqCl7kG9a+iPpSWGt?= =?us-ascii?Q?/nVYM3LRxQcSnByDfvnSsn3gXF0SdvLXyfxOlAWv7O76zvccVhwIxUISJiiK?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x0V0+2l+auutcBJWOZtqVtZK2qZnC?= =?us-ascii?Q?dwEcaENZBaEUw4a2z59TqGLFl84onp9uNOfkU9lHALgQunrWOnWf8gbEvbTD?= =?us-ascii?Q?LdjiIB0RfI2miBkewPUriGaluWuop2vnYC84dzeHPh684FkaOsUkYWf8/EVI?= =?us-ascii?Q?alA3EAfEH65UzFxlzc9ijDfgvE77XWE4kndBKnb6ycPIsHjvrkHHeRwvYjGu?= =?us-ascii?Q?6xj72E2kCplZFuGRy/sr17BCe5mdxAJW56+3zK72UDhZx1bzihC5ByaohKzS?= =?us-ascii?Q?ki6gT+fq034FD1uq7xVJk34rkngnjeDj7CJSueVDGI6vWrDyba42oEoSuR+u?= =?us-ascii?Q?24uX02FCSEoGwaWWhlfXYMKfHfftJ1VV/TT/z2H4MACA/jMlCt+ydwgAMBeF?= =?us-ascii?Q?yIbPUB+pIRdS9Ivxnbl3ixXhQzt4svbqPDLs2Q+acglnt+9h/TGr+l2ky2xR?= =?us-ascii?Q?Y4mXEcak/yS/u2saRhW9BNi5XSbTcaM+QsiiZJEu4CkV5eiy8+O9lsvSZsim?= =?us-ascii?Q?n2Gtyc6Xl0LZXUKBaCPUCwjLMddaaV1MjUdZKsV6Y2gW1IUh7TotyM8UHlrU?= =?us-ascii?Q?krT2mEND/xAwUKpMPYztFJNCWz+EA2ldu4Py/g+C?= 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: PH0PR18MB4425.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: afa98cce-6a3c-49af-e768-08dab037ee66 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Oct 2022 12:05:49.5601 (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: Gm/MT1p0/4N9nwguP0Rh4Evzq/b/ynOoA+y+t2UhaBjlfrKbg0LYkAjneOyM/RS/W/5q9jy3BRt75JsQI4jr4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR18MB3837 X-Proofpoint-ORIG-GUID: pNLNVhpfrOfyiC71LsHYjw2UwJ1LY1yX X-Proofpoint-GUID: pNLNVhpfrOfyiC71LsHYjw2UwJ1LY1yX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-17_09,2022-10-17_02,2022-06-22_01 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 > >Fix port group mask generation in altivec, vec_any_eq returns >0 or 1 while port_groupx4 expects comparison mask result. > >Fixes: 2193b7467f7a ("examples/l3fwd: optimize packet processing on powerp= c") >Cc: stable@dpdk.org > >Signed-off-by: Pavan Nikhilesh Acked-by: Shijith Thotton >--- > v5 Changes: > - Fix compilation errors. > > v4 Changes: > - Fix missing `rte_free`. > > v3 Changes: > - PPC optimize port mask generation. > - Fix aarch32 compilation. > > v2 Changes: > - Fix PPC, RISC-V, aarch32 compilation. > > examples/common/altivec/port_group.h | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > >diff --git a/examples/common/altivec/port_group.h >b/examples/common/altivec/port_group.h >index 5e209b02fa..1c05bc025a 100644 >--- a/examples/common/altivec/port_group.h >+++ b/examples/common/altivec/port_group.h >@@ -26,12 +26,17 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, > uint16_t u16[FWDSTEP + 1]; > uint64_t u64; > } *pnum =3D (void *)pn; >- >+ __vector unsigned long long result; >+ const __vector unsigned int perm_mask =3D {0x00204060, 0x80808080, >+ 0x80808080, 0x80808080}; > int32_t v; > >- v =3D vec_any_eq(dp1, dp2); >- >+ dp1 =3D (__vector unsigned short)vec_cmpeq(dp1, dp2); >+ dp1 =3D vec_mergeh(dp1, dp1); >+ result =3D (__vector unsigned long long)vec_vbpermq( >+ (__vector unsigned char)dp1, (__vector unsigned >char)perm_mask); > >+ v =3D result[1]; > /* update last port counter. */ > lp[0] +=3D gptbl[v].lpv; > >-- >2.25.1