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 1B64AA00BE; Mon, 16 May 2022 09:14:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F065040A7D; Mon, 16 May 2022 09:14:13 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2050.outbound.protection.outlook.com [40.107.22.50]) by mails.dpdk.org (Postfix) with ESMTP id 9EE8440A7B for ; Mon, 16 May 2022 09:14:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iF1BWOhMYsddocFELsSEh8rSUI3TTwziV/YVqlzG0gCNSyRoV8/sNkq+8Tid0TkmhS1Esel+s7OPUcQbRnLx1isQpbDHlQPaZRQXNqparX713MbUf5uTvtZCjw18jREzhN26bxh0vMUlYhog8EJu7kSVNkm6OJNZL+JXpB3sChjQXMdVzjjZXb4uEvHiPWjhvVEKT+oUkmvxNEy7xVkXOyxF3efkz2jGCDsWTbKeY699HolvSoCgbT84ZXncJOHvFCQ9W87qfuro4qt67VjjpgZqg+SjDUOfcvOSTfDuP8veWAf8vx/zGTgX3IhnQHhLFHAL64qVUiK/FE15Yn3yUA== 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=0ZSAM3/axVgeQdr1jlBjWZoTwJJIT8V2EIETe5isB7s=; b=TEZ9P+3BGBQMZG6FhesKzFxc83sw47P0fDvUUkXoOjL4jVOtP8QSyoK/wJf9kzSnY6IiYnXbViZiwbfuow1MqbyISRoW5bSQOfOJfcGBamS7zfO8NtuFedXiW/JFP5MM5f46wODZWZAPTo0Qq6d6qa32xSYD18UoRbwrcOXtAkJvTpA3/3QUWOBEYPC9iGt386a/GQamxQ8E9f75AFqsj31RdOoVKlJWYejpSNggSRlu6xGCbExtb4ACkNrmbZwgAE7kuZm3tlABsUWvJetppbxTK76/U8P1KwZAJCnYsmQTYJm6O8pN4xnV33LftUSqoquvXv8mIEktud1cIBCXnw== 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=0ZSAM3/axVgeQdr1jlBjWZoTwJJIT8V2EIETe5isB7s=; b=ouvH2s33P7h0Q9HJpsuY76M3qNN8Ps2GXdXvDZ0sCgybJabLr9WIZy6O5px5E4s8oP4FPgbobF8dOr59idlVvfDW5kGze5YYCQds8HGDn8cow80HiZthi2d0Ed3DoYnS0o1OvEKqQTOtWQhnU7f3R0dBeneF4FywnVBIgiDaByc= Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by AM0PR04MB5844.eurprd04.prod.outlook.com (2603:10a6:208:12a::25) 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:14:11 +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:14:11 +0000 From: Gagandeep Singh To: Akhil Goyal , "dev@dpdk.org" , Hemant Agrawal CC: Anoob Joseph 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: AQHYWFsJRZTxPA6TdkG3BrXzqxySQK0crAQAgASJFTA= Date: Mon, 16 May 2022 07:14:11 +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: 10250545-9cc3-4c6b-5a0a-08da370bacee x-ms-traffictypediagnostic: AM0PR04MB5844: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: YFY0cn34aWRZ9Nuw/V9s68f0Rv/HEzmYEo3a0e4HB4f9qiffxeXpbPJ06nlA3LBR3Wr7D7EMqJwrZac8+7nKMoGyWuw+k792SpHNSaCbexY8ZPIi09QF4XQEWsdUfr3qokoOJ7jLZNnA4+rQI+n5bliflt8bPXhvet9ssJYAL8IBma9IP0VlVniu6KtXw2m9oHnlDyxzTSLJsSrlRZyWB5kqdjUGAxXwhsoH7PdMuJq8ZAjVP0KGtP+Me2aPxLvs91uPAFOtA0zszA/9VhoIadnNfo8mPSfjZ+sNuzVkBEwTwBlNRhNSmKHkzR5p6SpMiBE4IG7qEwfyexMtj7w5KOWJ6OXfS2eC7+AM0aEbIFAVG19LUanZecdbB5tmd2hV9GcJce5rDTgSVZ2m51ypGJZJzwxX7TVSfm5CNuJX6dptADoeP6mF1hDu5xwso/8vXbOS8P9ntmgz+GykdA+KHja4ET21PeR2iYXy1yMlL2CJ2fl9TQR75/pRaFbdzGBHb0HOr9T6YxdDuSm+oL3HI57/7OCNneCklR6UNAx7CQxmrjDJArIm7kOiyKW5j1wVvblWxALxbSh6XNtBwNex1oixJgY+25KZ/Jum3OOijiXfIXAjz2ZiVZiPNZ+OjeDmUcjBOaJK/60d2JLX1PpMyuCo/c8EVn0tD2+1Rs17Zmm/snV/WnTlY8NrQjXzSqB+I/i/0k4c6VznsbNlEQ0YYw== 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)(122000001)(8676002)(316002)(26005)(6636002)(9686003)(6506007)(186003)(53546011)(110136005)(7696005)(5660300002)(55236004)(76116006)(38100700002)(38070700005)(71200400001)(52536014)(66446008)(4326008)(66476007)(66556008)(64756008)(66946007)(86362001)(55016003)(2906002)(33656002)(83380400001)(508600001)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?28KRm1IEvBF2bgSeLbZ/kd66p7IdT8xeX6Qv1AQ7MeqMb/KMMJrKG1ovvZgK?= =?us-ascii?Q?FuELMneeh2OLp9m4Zg0+Y+ss9TWqCaKUWV5dWvcLsd6ZJ9mMlxbb+Q+C5FZc?= =?us-ascii?Q?RPGf3pywF6L/dE+TVOyimiohtwqTnzCQGEhn2DVUY8XsZuc4ZvsAU+CbgWkf?= =?us-ascii?Q?S54SP16z8FGE2kAGg7LNIAxGwR2ZEJ2b/Y8z2iUeYDIWepkAJIgcofq63j8v?= =?us-ascii?Q?M4DaNdpMcwQSLfkDm8pAcXe8fYY6iLjR3OLva5Q/Vw07kwIbnHzKEr4fCPqZ?= =?us-ascii?Q?g0cjFVMFoXVqtNXFxWQ1FiglZWdzWN8lQKQT+R9/zrJdHwN3es9sLNMSgSjd?= =?us-ascii?Q?RLQLhvKo74FnYWB6ivUHcUoJCSfYPmpe07Iu7ATPsTJEJY9R+55McBxgzrtO?= =?us-ascii?Q?vo3CVH17xD1roSO743b2NuJdVB17T7mjSg4xchOBbCDTf+dk4ZJcmsHJdplS?= =?us-ascii?Q?hsCl3ZBYVMQd6lQvnN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?= =?us-ascii?Q?kDifCUPnS7TjOVPc0XmZ4bDWUlIVcePnWybFzQBIoPpHITDXFlq3YudAnlqP?= =?us-ascii?Q?J44BeyBV8rWnKby3Jgupq8uwpIKxUqnXDq4EbaL7rqZmXDqsstOhcLkyXT5V?= =?us-ascii?Q?fTF+PIQ/pS2CMiTuntHo+/L8oaBYIk2egLUXWDOGiHv0KZsrrSKNAm/PSDdp?= =?us-ascii?Q?dfIXmAMAHBrstOlyHGONedqcbxXWOVoNj2g04lOymIIjuLySNvLET43bDpFd?= =?us-ascii?Q?mX56WNHz4vg+pQNqx+SLL8xwwzOAPmsr9ox1g+Df383Hb3oEHxEEIQA4yCke?= =?us-ascii?Q?kjM1LsCaNvIDM4zVeft4+T7UbK9vp7OQQfu5sNX0vbxfYluW?= 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: 10250545-9cc3-4c6b-5a0a-08da370bacee X-MS-Exchange-CrossTenant-originalarrivaltime: 16 May 2022 07:14:11.1191 (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: /zS+45OL/eYe0taVK3QOfznfmQ7JIvtvmoc96JRbPASa0wYX9S1mfmZU5NL5SzsN X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5844 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: 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 logi= c >=20 > 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 results in buffer pool exhaustion. Application has option to increase pool size but that may not be Helpful for the platforms those with memory constraints. We can work on limiting the enqueue side instead of keeping the dequeue to avoid any performance drop due to any empty dequeue. Dropping this patch from this series. I will update the logic and will try to send as separate patch. >=20 > > 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-cr= ypto- > > 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