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 CDB4B43CB8; Fri, 15 Mar 2024 10:56:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54B084027B; Fri, 15 Mar 2024 10:56:09 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 290074025C for ; Fri, 15 Mar 2024 10:56:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710496569; x=1742032569; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=9Y81qqU09ylYUBp3oQH6Ln2ChBNjS+0zfUfSwxMFBk8=; b=F6K/+9sLcj257X0R951NntnLR98NQ81vS+FUR3CDJQ+zl2F8jxGC6WDY 0f7LLDBJ6Ki8wc+oxJC2mV7hYKpsxaATM658V/aDXFbdyoF6o4PXQeQvc e4IXutAfywaebFA6+AEw4f5PCeOUxUZZvEsNDF67zM7tLjBH1+uVe8m9p RyqoNBX2iTTrhLqROhUPhKBxqtddZhgcjbybg/CH1i2vT3nCOj1QEST9k /Qvubj+wzTnTlY+JGHna5S796J4JTN20XhAgTjo+mcII3Jz31CDW27D46 2DNwuXvccHX86VFF7Gxoc5rzzj/eLGfbEXFDTrchm42hbs2iOfWSH7gdR g==; X-IronPort-AV: E=McAfee;i="6600,9927,11013"; a="30801298" X-IronPort-AV: E=Sophos;i="6.07,128,1708416000"; d="scan'208";a="30801298" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2024 02:56:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,128,1708416000"; d="scan'208";a="17080597" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 Mar 2024 02:56:06 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 15 Mar 2024 02:56:06 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 15 Mar 2024 02:56:05 -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.2507.35 via Frontend Transport; Fri, 15 Mar 2024 02:56:05 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) 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.2507.35; Fri, 15 Mar 2024 02:56:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=liTq6mAmK0rICiqrpw6cfk86r4YoZ+1eBFxLL89F4Fmmimh7k/PfvLgr5z853+TDEZQJevFR1g6KhkPwnoX5yZss2mwME++pRpc/wnd9RMcA9zcwNXH9wQwBvPUIaCvb0itl3Q3YlOCEPfYWImSlsivjbaynC0HV9WPL5lY/NGI+CGiqnQT1MyPeAE1FKS4NfmJJlxrqonYNoqAJ5mFlZxt3+750/vbA3vUbzAm8Nvr8J9OWiMdsodKL54u3pR77FJfnAxrmi40lsrZjJ7e2SY40k2NgSrqvFLLW6HHoK6EDWNh/jRPuAgtfLBrTDDq/2f21gOMWnrwgsIA7g3pOJg== 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=AfhAihpqtQp8oBzFLjKymmb1QEh5V5qrwgqDOjFhOWc=; b=fVNJ/+xSmeS2nTndSd2kVEvBr/A3p+h5vEcOWgHb4nF4I0bNWozPuRMMPko7N0pXlQkCUp89sHDAKyWqaOY4mwfRwIwSNpFquVmIy/4hHxjBidorNEcC0K6ADSQR3COCah0maUiZMPpyTn64VGRKG8CI5sB9FWetMqUCQfIv3mp8WlkqYxeNpXicXxYDYP3hqenfA4w275OmyoH6OkVdd21aa4pU9rIZaLpxZZenUNuNGDJImIn/0+EHmIfKEbQBiW6EYCT9y8L7wRmOsalm0U/swJSJIGih/iEBNpDu8C7grcPgXjY2xFr+so16FSc5Um0GY2uXdsGyYvaIVWg15w== 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 PH0PR11MB5013.namprd11.prod.outlook.com (2603:10b6:510:30::21) by MN2PR11MB4582.namprd11.prod.outlook.com (2603:10b6:208:265::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.18; Fri, 15 Mar 2024 09:56:04 +0000 Received: from PH0PR11MB5013.namprd11.prod.outlook.com ([fe80::66c9:72ce:62ab:73c2]) by PH0PR11MB5013.namprd11.prod.outlook.com ([fe80::66c9:72ce:62ab:73c2%6]) with mapi id 15.20.7386.017; Fri, 15 Mar 2024 09:56:04 +0000 From: "Kusztal, ArkadiuszX" To: Akhil Goyal , "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: AQHadVZunhhE5o7NF060uAMSyV4PTLE1/BgAgAA7/MCAAPlbAIABYDJw Date: Fri, 15 Mar 2024 09:56:03 +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: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5013:EE_|MN2PR11MB4582:EE_ x-ms-office365-filtering-correlation-id: 698d1666-04cc-41d9-83d6-08dc44d620a4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3XVKUNMSp1i0E+Ilw9JbzGPKeTXf6tyZdAWVJ04eUBp7HlBUYlYzqTfuVBRYRs9jBtz/M15x7l3j6SEF0woDWByKApttd8uO/vGYq9fyFbddimrvLARK0eEyDnNJgkHeUc8klorSr8NsfzICvyf4flvS5vZDWp05K6Ll6u1Bb4y4lzDNB6gJGsmZiQwchN5dY14U+eMtWP64ZDyFY6bGLgHZjT6BzjXfXHI8r5LV0MbVzq3OZ/nmQ/fD/r9UVDnVPuQ9OcFQYLHK0M15k7P17LVP8A/Bu81V7fPUO+2slMjWh+gqZ7YWFgduVLEJiag89UcdjZDJd63KGbVc0iCH+225/WfhFhFoHp19FJNbKIM7tTZmrsat3Sbuv3Zud5cGGBilmD0bk+AbsjpUsEYGcRc9+6zMtq1UsYPKGqxpxiapMMW09Ss0yPBXor6HhsHOd9h29GEjL489l3KhGu2y9jS1ZMxHGhWEgW9KxXpMs0iY4755TRXFWyt8u6jdp7STdoFWqAXH770/3s6lbwJnudtJdAC1KRK0EPND/+nVLi5ZGrO2za7xOdiLU8LT/V/tol0oroccEahuASIuSp7qGDprDwPxcosBv6XPmZdFmZXAYx0r2riJvA6hrZQJCC19iJMZR00VrdNWx9a9MBJ5Uw30+N3gDBQiMVU78spa5bN29jsApZXDrVI7471mvfbdDFlL4mCcU7sZmJdY3V7ndtXN740nbkv2h832GzP3AxM= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5013.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(366007)(1800799015)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?FxyxxI/biGoP6dNHshhwD65UHQ7JcagQSIaxPta7wQjx4bXqFnm6pQm4YisL?= =?us-ascii?Q?NBlNCk/l8k2i/DJkKLVZaF43SUlEBmeBa/PorzRwTfdZ8GbJZQNn/TxMth73?= =?us-ascii?Q?PAx0P0VTzlqBQon6Cdsx7i2AQwZSFjUg2Llbnso64DiAv48f8XrmZFatN1DK?= =?us-ascii?Q?Fiw6Zgj4Dg5GkuKzOzyOCHaLAJhA+jY8lA4hCAIDqKafY3Ug4c9SQD+zOjdq?= =?us-ascii?Q?tL5OVSgLiNPKWePY1127kh2lxXes0OGgAAmeqYpQPW1yMj643Zxmt8Ap3vxi?= =?us-ascii?Q?T7wd+WP5+J+Kpp+F0X6e6IRCInhlEbtRDgcQG1eLHcq7gxJmhidkKW+xxzat?= =?us-ascii?Q?U7OskaC+MYDVTOvUIltHk9jAqJWB32d8fwaEkQaEBTlAOFyj54hqeaeb17Dn?= =?us-ascii?Q?As3rbixNoA0Gbwe8LaERxzppJvlSrta9gD4HHtNFLBESzjf9jZ/TruwHqyFa?= =?us-ascii?Q?qrZwgi/5MNGgxgEzSjENHclm600tZzxl201ndnt9yWlyLCDlqZD5k2LaDpBn?= =?us-ascii?Q?JZ1FsLjMEwyqpuIjiIO2Y0wg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ascii?Q?ena0/skwIcKb1Kf/ly9DBZ6wyM3E30VJ1t1bjOfkxQyMjeJVGZo+nHHvt1Bb?= =?us-ascii?Q?54fap8tv9sWOasO4eP/dKuf/jCUf6dlfsqkf/8R4+nmf/y0yIaee+249OWJP?= =?us-ascii?Q?KmEoY0KC+GROTTPpewp3GjCfqm9eja2SVWa0FqHt9l6OTtJa7fFKOJr838St?= =?us-ascii?Q?FQ=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: PH0PR11MB5013.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 698d1666-04cc-41d9-83d6-08dc44d620a4 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2024 09:56:04.0524 (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: mCoS5MbmSBHqETkpCCUtvkB5dwY/R/8KLsDF68Zm9RcMmjSekPPmH+2G9YlpoaL8hGgQHuuuukT6HM3tE4iuILnih7n/kdjuM5VCN8uRuek= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4582 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: Akhil Goyal > Sent: Thursday, March 14, 2024 1:50 PM > To: Kusztal, ArkadiuszX ; dev@dpdk.org > Cc: Power, Ciara > Subject: RE: [EXTERNAL] [PATCH] app/crypto-perf-test: fix unset crc algor= ithm >=20 > > > Subject: RE: [EXTERNAL] [PATCH] app/crypto-perf-test: fix unset crc > > > algorithm > > > > > > > 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. > > > > 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. > > > Still it is not clear. Which use case of test-crypto-perf need setting th= is? `-optype docsis` currently, so I can narrow down it to docsis only. > If it is specific to a usecase, then it should be under checks or it shou= ld be inside > PMD. It would be the best to have it inside the PMD, the problem is that it chan= ges algorithm for entire process, so until changes made to the API, it should be under user control. >=20 > > > > > > Also will it ever pick neon handler? > > > > 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 for now, not many choices available.