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 6E6D943CA5; Thu, 14 Mar 2024 13:49:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B0424028C; Thu, 14 Mar 2024 13:49:35 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 372C640041 for ; Thu, 14 Mar 2024 13:49:34 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42DNMqW2016210; Thu, 14 Mar 2024 05:49:33 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2168.outbound.protection.outlook.com [104.47.57.168]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3wucg2vv27-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Mar 2024 05:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jb2VDIRSuoPMMJrSJQ2KLCQzmIv0p+1ks78afMFpjwyXgneZsC139WQd3cN3gZ98iOdFNkRJGnY05TKMW83kvU9SUEy4qAKVDl7CDHQZ3IfYKPF6Uq73sFs2HzQPtkJrTWP6jXwnNSok+MHV0uqj9U+S22z5HExe4GLjsLB+e+kixxfigIlzgLgXnwTMZnsHZHwFKCsa4EJPb1sira8VGBoIzL7yrv3mFCZaSggCA/xb9fk/JcUrkYVIxLcaFwAeH7ylLq8Skxq1Jvvmx2tv1sfyX5mnPKt3cBQIng9RhWY18ErRFTJ5hNkqCgjbOtwq7H8GwQyS6LbOHGV81h2Iyg== 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=M+7WQzbsiO6K0Bu0uxDJy0VL+MrBpJSLjc5e/hOqdoM=; b=nvCx8quYs47ilIP6zDzJE7xkznYimAFMTtb/6IIhDEedVoGeuazAuRtDe1pnHipHbRKupJIF442m3EQgAwVlIXWBi9vSJ+FH/Aj0y2EQrcxZNrRfhgAt4ikPuCQ8K3sia073TF02e4osbQKmQYe92/wHIjTapeCBlmphMWnHJkRpFkmYKC0kyC+95rUuAOUMZFdnPYeUdJHCoq+vaNPKV4BlCNJwcDX+FJxp6osUCg6oj//5JR3kAJ284zc6Q5tQEFCh+asKs5Or8ssNq5L4yW+vY3vLyMYRbkJF85ri//ReANC9I0CB0vKl/RvBCoCCWmfU5iSBaGHAL2MPRj+2XQ== 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.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M+7WQzbsiO6K0Bu0uxDJy0VL+MrBpJSLjc5e/hOqdoM=; b=BPWVOfYhywfZOgz/6ITuDff29Pf2e0Ybfk0Qzd3vH1iAHm6+BlyDN7+YepJMunuyt1CjZPQbVC84s3WBq+lv5nBzczLl+Oa7xYVlrtOjQyfVTBN8L84Pfdk5FvaxA8ZQP39KqDibvmBhDLBWdkKAkOOFtrkExNdpId9lv1vcG4s= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by SA1PR18MB4567.namprd18.prod.outlook.com (2603:10b6:806:1e2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.20; Thu, 14 Mar 2024 12:49:30 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::4e74:4cf3:63b6:b149]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::4e74:4cf3:63b6:b149%4]) with mapi id 15.20.7386.017; Thu, 14 Mar 2024 12:49:30 +0000 From: Akhil Goyal To: "Kusztal, ArkadiuszX" , "dev@dpdk.org" CC: "Power, Ciara" Subject: RE: [EXTERNAL] [PATCH] app/crypto-perf-test: fix unset crc algorithm Thread-Topic: [EXTERNAL] [PATCH] app/crypto-perf-test: fix unset crc algorithm Thread-Index: AQHadVZrTfylhwZQhkK04ruPgjNas7E1+zZggABCJYCAAJfDIA== Date: Thu, 14 Mar 2024 12:49:30 +0000 Message-ID: References: <20240313145448.26264-1-arkadiuszx.kusztal@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR18MB4484:EE_|SA1PR18MB4567:EE_ x-ms-office365-filtering-correlation-id: 4de73b5b-e435-4b20-6402-08dc442530ea x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: s2x14nemY8PLZytuHkOAt7IPzTMSyGqEQAmqodOTcwHjCec4B4KqpaM19zsc+8Jtm0AKUQS0jU8gsiH1DFBBC6xLYQ7VK086bvw0fVmiAEuCTbvR0AAVTv13buxfIBgm/ivfhA07m6DTIVQofjkQAAkV+Q5SBPkEetkHguHt4jDHWOmFFaj4VqYDWa9u4eRE174xBK9BotHjox7C7/HdQzm8btKbwwOK1vT5JXs7sarnDk1ltHdmZfpLBVrT48ZmxhTt1/yMQJImXh4OLLYBm/T62l65xd+yIWbOfRiC0JkoxyOT1mAhFJBdNJ6HnZgs5vJTvY1PqSqEbnhWpY+jtznjmTEcbA4j/gY1a6iI3YDbGjupWND638Dbm+DOnMfbMyqtt2q/tQ0Cvg6z4lzyzyypNi+yjfQNcTCnFHl4D58d+52Yt4Kz6/mf3pQqmZ1dOtIW/S3HLnIteh2ktpuwh3K20W1BuqyjjV3vzqbHGqmMiD7NX95Cbjj9Can7DZoFwev/YKQo8+vTWg+E3MT6Y37ggAwxjVq3jOdY6C88+TAmvgfoJH2yfxuN4rvXT8uhEkAx7KiXQspNCQldGLrmejJAYvZFKGgRtqv/YGHilgxnd6B6u5oZygokwL4h+c9c+s1xoba1VLcihYHQF2vXU6sZT/uFAZITCuOFMG3DCqkr/FQzRWrHrYPeVWHdxDyuiNoRJtEIGlWo6UCp/x3ttfw9PrFff4jqqNuLDx+6HR4= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?CGrQoFahk2D7zWGlKgPcXEBZ1eylg6CDZL4/i1HOs4ecxxFE9cXiKJG6GaQF?= =?us-ascii?Q?UQyoYEjOaz95gFLtVl9NofETBPMnbrxClB+aLj/lc4bcSLLl1S18V9+G6bsk?= =?us-ascii?Q?9uLDWmmTFVjnMkc4OX6EHL6ky6JOX8J8z04nBGK+0eTX+Xx97+NoKLgKK52G?= =?us-ascii?Q?uezplhx1QeL92wVoi8BcFHCVtE/qoRWFtLupHJfGjQDfaHsIjBnsccEkC4FS?= =?us-ascii?Q?pfHfH1x3ppyCCGdckCFwEh3pRbIF1OYgZKhIPWHMuCpthBCGqBFgH54j39uY?= =?us-ascii?Q?cSKyhxzIIw5W3/iAtKQnl051LavbLTZGOGJTpwsBqnWC2eGZQpYDRcDi2qAn?= =?us-ascii?Q?PrXlZE9wugoXem9BneocTezVtl7CZLVyL1I8n5zqVZO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By1/ZielpNSxFiFnopaUUjF9x8ieEPWd9MmNgc00qby1p5n?= =?us-ascii?Q?t2zIx46rOV7tvjyU8vChmkO6fhXBDX7Il7COqvCI+ivDgd2j/bi678Mootbv?= =?us-ascii?Q?NcUVEgRrSoJCmX/LCUASRI1hVg+LysIlLcaG1HiKlclwCg94uS0SpZiBhyWr?= =?us-ascii?Q?FuUYcHy03P10KvwfCwHPTHLqVHXuxtjkGDdaklUnZOzMYapQUAPgsr4GIqhZ?= =?us-ascii?Q?7L0uaaTFWq6bp7CLV/DRL1kHMw4F64a87riP/8hM4vklmWwOVMf8C53X9KEt?= =?us-ascii?Q?i80G3ZW3mdLf7Y7xqjFkUUkacI1G0dZqPwpaV3eJ?= 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: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4de73b5b-e435-4b20-6402-08dc442530ea X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2024 12:49:30.4804 (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: NNKpquAAnsI+uPzWd3+Gkeq/IhYL9EyDblMAF/bdbvcFVr38PSF4AURD6Gl8h8U+EYjcVBaHzQ3xHKg4ZmpN9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR18MB4567 X-Proofpoint-ORIG-GUID: miWH6kR4h_cyw5Nm-uLHGLqYdTyy4xOd X-Proofpoint-GUID: miWH6kR4h_cyw5Nm-uLHGLqYdTyy4xOd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-14_11,2024-03-13_01,2023-05-22_02 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 > > Subject: RE: [EXTERNAL] [PATCH] app/crypto-perf-test: fix unset crc alg= orithm > > > > > Because net crc api is not thread-safe, setting crc algorithm by the > > > application will prevent race condition in the calc function. > > > Race condition still may occur when any of the threads will call this > > > function again. Function is called with the highest possible SIMD > > > extension, which is AVX512, but if this is not found, CRC API will > > > pick the other highest possible extension, or scalar if no SIMD > > > available. > > > > > > Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test > > > application") > > > > > > Signed-off-by: Arkadiusz Kusztal > > > --- > > > app/test-crypto-perf/main.c | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.= c > > > index 40c0b4b54f..58496797d7 100644 > > > --- a/app/test-crypto-perf/main.c > > > +++ b/app/test-crypto-perf/main.c > > > @@ -11,6 +11,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > #ifdef RTE_CRYPTO_SCHEDULER > > > #include > > > #endif > > > @@ -599,6 +600,8 @@ main(int argc, char **argv) > > > goto err; > > > } > > > > > > + rte_net_crc_set_alg(RTE_NET_CRC_AVX512); > > > + > > > ret =3D cperf_verify_devices_capabilities(&opts, enabled_cdevs, > > > nb_cryptodevs); > > > if (ret) { > > > -- > > Not sure what is the use of this API here. > > Which calc function is it fixing. >=20 > Yes, this deserves some explanation, rte_net_crc_calc function, when alg = not set, > will first try to set it during the first run. > Yet it is done in thread-unsafe manner, causing perf-test to most likely = segfault > because of that, when more than one thread used. >=20 Still it is not clear. Which use case of test-crypto-perf need setting this= ? If it is specific to a usecase, then it should be under checks or it should= be inside PMD. > > > > Also will it ever pick neon handler? >=20 > No, it won't, currently only qat is using this api though. > This api needs to be fixed, so eventually this will look different, but f= or now, not > many choices available.