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 B2A9CA00BE; Mon, 16 May 2022 09:54:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 992DE40A7A; Mon, 16 May 2022 09:54:46 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140048.outbound.protection.outlook.com [40.107.14.48]) by mails.dpdk.org (Postfix) with ESMTP id AE4B940A79 for ; Mon, 16 May 2022 09:54:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N1YJ7Hw/GAuRVPyK/Z8VeZSwKC/+tL98CXw7XYN4bLfijAB0U/wKNTiF47/T7D41Z2m7VqeNQnY2MsjAKeArwEQgra6vFmJlCUA4cfa7dYZeEv8im0BOhL3mzXo/xhOgwbvbSiqv4Xt0vnP/+UzOm22cf4sTch8G7buXpbgwzVS/8KlT9m+BGpykZK0ra6Qwfr4rdZv+brHacfECJ9CYdxTCtgRtwHtS9ndQHmhb7kjd9Rx58LGnuymHKN5cdL6r2hndnuYGMcmsMyHLNaiMcWBfrmod2O5HNEmZ+rJ4ctO1eG6s9AQX59jsDo5A9SgamAF1zNzNVLOlG9h1U7XlDA== 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=Ve3JwHIfWGKRQImo1gYurXpZvY7EXBiwdqyqHwhS3QI=; b=By1mBrf9nT4C+t9WMQaifYckdRkwoWqEhZEj0GMCTuAzhW9JXMmmVFnFF1bnZTK/dhk8aAgVV2CioRa0tWOWgBKAAFPipC27JoLbHZR+b4tYHFSkGlCDLPD9SnsTsLYXHlBY7+0wrIpaXxsgH9axIPGPm3DJkMnvTU7SGxfFG0I8NKxrk8qCYdQ/kQlatk6d1WDMxpA7lh+ODdoDaULIP27HNRdJbv8BcmYpbE/PBDy7VAN3u+FXlu+DkpS6Pyh31fe/8GQwQAa97H/a4Wx2jgtqTtETK8xqj07AnaR+yB5PES/O7ZhZEHOBjbl1h+cXAXMUmqEqJ1jU9kbjPedCHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ve3JwHIfWGKRQImo1gYurXpZvY7EXBiwdqyqHwhS3QI=; b=ddbLz0yw8u6FQv7XlpIIwAbUMf1IgQMX5TR4n/fHTo1Y38AcaATUelQcXZ9yxOQhdQ3u8gduL2irl2JOYhQ2y7eHmo4hmlFrZ3ZTQZviCkzNn//SXnSX4pMID5i3xrTgxCxYKWpVRyTL1HePeVn6VjMtFGU997SySWqK0wmLlKk= Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by AM0PR04MB4001.eurprd04.prod.outlook.com (2603:10a6:208:5d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Mon, 16 May 2022 07:54:44 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2%9]) with mapi id 15.20.5250.018; Mon, 16 May 2022 07:54:43 +0000 From: Gagandeep Singh To: Anoob Joseph CC: Akhil Goyal , "dev@dpdk.org" , Hemant Agrawal Subject: RE: [EXT] [PATCH 1/8] app/test-crypto-perf: improve dequeue logic Thread-Topic: [EXT] [PATCH 1/8] app/test-crypto-perf: improve dequeue logic Thread-Index: AQHYWFsJRZTxPA6TdkG3BrXzqxySQK0crAQAgASJFTCAAAbJAIAABYIA Date: Mon, 16 May 2022 07:54:43 +0000 Message-ID: References: <20220425041423.2232034-1-g.singh@nxp.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=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e015debd-68ed-4ea5-a15f-08da371156e7 x-ms-traffictypediagnostic: AM0PR04MB4001: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: zWzFRr6JnzhzckT8YsZ8xr2dGu+q/7btqn57LmaQRfbn4MQZNuC1Xj+/cZi0dC/q31hlCOVW3RVPQbLf+//+9yPXk2Vf3VXj1i/aSbUj4dxKrdq70qI+Ih3uipr9O9Y4xBQjscbx7gjMLX38u5KKcKcqOQcDDIrUTZNwFwn4DN+pEyNynHkyph0YrJ5BXA94UlmX4E1esVkeqwhgBfL4SBi2YJ9bg9gUV+gN2pj6DGM9f1fgUH2547Mc6+t8O0pNkt6CSBT3M/YEZPI3AvvaQDqWJGh6sOUR0lZoFU+azXGKko8JVqrlEClKKjkwQIa/Lm6URSwu9NjdF1kMMMJBarnz0pdmxVIRcOgQlwQdIz1KSQWWLk23b5kXGnME6TNHryKQqWX9FkoX+MUvjipUiqDdB5nk4CPI/WU0wnGaf7ww425ZpAyV9lxjsTc3FPiM4RpvM0SsxqDb0eGds33X7oa7h2+EyqZKxJ7nK3obu5iB4trDp+Un9OQugF7Wgf6PGafoGM0Q9Ap8SYhYZNmTesPsRl7l9z9p2AF7jdcVbNbivnTzK/Z0trNjDXRZYxxY2FKnI0ZAIjYVZ/r7/NMY864XwZMRhEfrVSutAKZpKaImTqnzVhKOuqVwIyiCWeiqmpY7sQDYwSPzMojs9SxT4jtFkOfGosur2NuZMrr3gDMWuZj/ie+jEo/6bys7KSjH+HSctPiZVTYKuw5gn2dbtw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(9686003)(8936002)(83380400001)(86362001)(8676002)(316002)(508600001)(55016003)(26005)(6916009)(53546011)(38100700002)(122000001)(7696005)(6506007)(66946007)(5660300002)(66476007)(66556008)(76116006)(64756008)(66446008)(38070700005)(55236004)(2906002)(52536014)(4326008)(186003)(71200400001)(33656002)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?r5F7vu1HI+GcoybSY/bb1xIcmNbTEUpVoxoRWhZ7WFfjktSgSjs8Lkpb8iEC?= =?us-ascii?Q?HBjMbLGg/CD8Bk4eF0ijX/TGEBFHOSAzYMi4yrR2Rwmv2yE7oWm01Twf9Wq5?= =?us-ascii?Q?q8oX96hzYr4lvc+B/8Bgr1groPQ2EOLbiJDn9PJoMURw3e7OKBEiWd9Nn9FN?= =?us-ascii?Q?VrptyWONqG1Nl8BJPzWPey40IEBXhXpMGWZjuz6jw6bSl3r+gBF9s56k76IV?= =?us-ascii?Q?ytyLH8ullRw1AZJZnM+HfVFlsoE1frr4SM+SEbc6CKEvUhXZOE0mNLe6La0r?= =?us-ascii?Q?GsC5GnC/8eTs02rrHZaT6ESt0+AVR5KEwCiPEXXX/pambRbouzbPy1k6cAfl?= =?us-ascii?Q?2OFa6fc1pv/zSuXP29GsPGn7YAbuIWIAM0QxF64oY9XLGleGgOdQxh/pXQVl?= =?us-ascii?Q?N7e7xPNCIz00ezSaLSNa/sHpzJoOSrUqO6FUgFFJrN9EumynRc3T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ORsbXZc2Oyh0FivsOvrwstVas2R4jxtKoIO?= =?us-ascii?Q?XufksDzOdWGkuailysBmK1Km2xfqVsmCahP/BGH9glIlfbl3diOBXkoPwx9c?= =?us-ascii?Q?/tD+M+KAH0t5+prJS0KWSzXdS6A5rXFD0WflvGlXqiH9F8rEqOJTdreg+/Iy?= =?us-ascii?Q?CHfe4FnTuTf4CZw7JeV5XSHDPZ/NWmU/pdFircidR0sUv9xhbmGxoMeGL4JH?= =?us-ascii?Q?NMOd3G/uvm0v2wQVYVq600M83ZqX/R3YkKV23YKf65Kl2SyGDyV3nXl+qiex?= =?us-ascii?Q?T6ymuk628QjB0hKkVr5RkZ4hQYKpTwb/taMh1iH2V/jzww6CxmIlpj6RlRn/?= =?us-ascii?Q?clNrf8wfdEVAJ8JbSM2V/jO5txEkE6UhKBb/8vWAD8Y3aZg6?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e015debd-68ed-4ea5-a15f-08da371156e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 May 2022 07:54:43.7870 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FaYpSnWRr6kny4lOjLn3k/woKEzgxWb2ou8pDntUoVeeIz2yTvcCOMweNU5yB/HV X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4001 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 Hi, > -----Original Message----- > From: Anoob Joseph > Sent: Monday, May 16, 2022 12:57 PM > To: Gagandeep Singh > Cc: Akhil Goyal ; dev@dpdk.org; Hemant Agrawal > > Subject: RE: [EXT] [PATCH 1/8] app/test-crypto-perf: improve dequeue logi= c >=20 > Hi Gagandeep, >=20 > Please see inline. >=20 > Thanks, > Anoob >=20 > > -----Original Message----- > > From: Gagandeep Singh > > Sent: Monday, May 16, 2022 12:44 PM > > To: Akhil Goyal ; dev@dpdk.org; Hemant Agrawal > > > > Cc: Anoob Joseph > > Subject: RE: [EXT] [PATCH 1/8] app/test-crypto-perf: improve dequeue > > logic > > > > Hi > > > > > -----Original Message----- > > > From: Akhil Goyal > > > Sent: Friday, May 13, 2022 3:17 PM > > > To: Gagandeep Singh ; dev@dpdk.org; Hemant Agrawal > > > > > > Cc: Anoob Joseph > > > Subject: RE: [EXT] [PATCH 1/8] app/test-crypto-perf: improve dequeue > > > logic > > > > > > Hi Gagan, > > > > Issue more dequeue commands if the gap between enqueued and > > > > dequeued packets is more than burst size *8 > > > > > > > > Signed-off-by: Gagandeep Singh > > > > --- > > > Why is this change required? What gain are we getting? > > > I see a performance drop due to this patch. > > > > Issue is, in case if security engine/driver is slow in processing the > > Jobs especially for larger packet sizes then in that case application > > will keep enqueuing packets with higher rate than dequeue which may res= ults > in buffer pool exhaustion. > > Application has option to increase pool size but that may not be > > Helpful for the platforms those with memory constraints. >=20 > [Anoob] Can you elaborate the issue that you are hitting? >=20 > > > > We can work on limiting the enqueue side instead of keeping the > > dequeue to avoid any performance drop due to any empty dequeue. >=20 > [Anoob] Shouldn't PMD take care of limiting the enqueue side? Application= can > specify the desired queue depth and when application enqueues beyond that= , > enqueue API can return 0. Wouldn't that good enough? Agree. Unfortunately, Currently In the NXP platform drivers like dpaa_sec, = caam_jr not using the API's given queue depth. This is what I will discuss internal= ly to support this in the PMDs itself to limit the enqueue, if we can do so without impac= ting the NXP's PMDs performance. > > > > Dropping this patch from this series. I will update the logic and will > > try to send as separate patch. > > > > > > > > > app/test-crypto-perf/cperf_test_throughput.c | 42 > > > > +++++++++++--------- > > > > 1 file changed, 23 insertions(+), 19 deletions(-) > > > > > > > > diff --git a/app/test-crypto-perf/cperf_test_throughput.c > > > > b/app/test-crypto- perf/cperf_test_throughput.c index > > > > cecf30e470..5cd8919c91 100644 > > > > --- a/app/test-crypto-perf/cperf_test_throughput.c > > > > +++ b/app/test-crypto-perf/cperf_test_throughput.c > > > > @@ -223,26 +223,30 @@ cperf_throughput_test_runner(void *test_ctx) > > > > ops_unused =3D burst_size - ops_enqd; > > > > ops_enqd_total +=3D ops_enqd; > > > > > > > > - > > > > /* Dequeue processed burst of ops from crypto device > > */ > > > > - ops_deqd =3D rte_cryptodev_dequeue_burst(ctx->dev_id, > > > > ctx->qp_id, > > > > - ops_processed, test_burst_size); > > > > - > > > > - if (likely(ops_deqd)) { > > > > - /* Free crypto ops so they can be reused. */ > > > > - rte_mempool_put_bulk(ctx->pool, > > > > - (void **)ops_processed, > > > > ops_deqd); > > > > - > > > > - ops_deqd_total +=3D ops_deqd; > > > > - } else { > > > > - /** > > > > - * Count dequeue polls which didn't return any > > > > - * processed operations. This statistic is mainly > > > > - * relevant to hw accelerators. > > > > - */ > > > > - ops_deqd_failed++; > > > > - } > > > > - > > > > + do { > > > > + ops_deqd =3D rte_cryptodev_dequeue_burst( > > > > + ctx->dev_id, ctx->qp_id, > > > > + ops_processed, > > > > test_burst_size); > > > > + > > > > + if (likely(ops_deqd)) { > > > > + /* Free crypto ops for reuse */ > > > > + rte_mempool_put_bulk(ctx->pool, > > > > + (void > > > > **)ops_processed, > > > > + ops_deqd); > > > > + > > > > + ops_deqd_total +=3D ops_deqd; > > > > + } else { > > > > + /** > > > > + * Count dequeue polls which didn't > > > > + * return any processed operations. > > > > + * This statistic is mainly relevant > > > > + * to hw accelerators. > > > > + */ > > > > + ops_deqd_failed++; > > > > + } > > > > + } while (ops_enqd_total - ops_deqd_total > > > > > + test_burst_size * 8); > > > > } > > > > > > > > /* Dequeue any operations still in the crypto device */ > > > > -- > > > > 2.25.1