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 0B16BA00C3; Fri, 13 May 2022 11:46:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2AE940E64; Fri, 13 May 2022 11:46:54 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 0EE6A40DDE for ; Fri, 13 May 2022 11:46:52 +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 24CNcFQq009676; Fri, 13 May 2022 02:46:52 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3g1c379vju-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 May 2022 02:46:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I8ohKy5DMvDGkEJgg9O4FHAWrYDXvW/V/3gndOs2aFmczYAuZBuF6QQoDghuqQh/xvcAsvBF1tWNv8JOEgngM9TymuzRLQcGMW3vLeJiiyg048JlEtA68qNg12VsRl/qVxYC6m/QpmpYDeV+rshFLCgPsXlYKOq215THciZeRsHkPXAqHiCoZsKqfgi95dvr+cb8F4s/0aZkLcYirEzEfD1G+01lj2qNUa1Q3RyTKvNGFDszn3UVyIoniYEuzb25BxDli8oe+Z7lrU3pW79WzFIvboJPpoovRW2VhMm6vT11LDOa5O1u/jSn3bMTsTCfX9aINaTy1WnZl9PGXfST6Q== 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=jB60k7Z/Pz38axKIlxCFLAWd2iN5P+dqOlIj7TokbqM=; b=ZYQoQ04KX5yd0bf7ZH/2QqgoFDvvWnxHkED5uVCcBrJOq9P/yM8yoN3QukkxHispSJGvqJjQUuW/zubr5vOVyjJPhQQn7+tClOkTtfaEU/ZNJQ/lKhEKelZQS1EtVMoaagdGjaL9xEE8qvhNgNI0C2BFvEZC+FcbC1iZpihkOI0Of9YHeoTqoYM2gAm1jgPo8aCsKj+fSIkvPV6vcMYPegqIDHudhptM8US0hEG7/g5/aGPWPTJbxWBv1cC9TvkAT3pnGA5c3pxyg5SAgjJZeGcquib9/S/w3K7XPxaWsO8qELZjZlHqdWkiq1YhgYVruTZKHejyLknmH/6tZhpPNA== 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=jB60k7Z/Pz38axKIlxCFLAWd2iN5P+dqOlIj7TokbqM=; b=ZuvngzCvpl9RorKmZuZdsfMT4rJKyYu7dOH1vBAfj2VWULCBHAPebyiilNH4hxWdGj4I4GP22Es6mUVovYzUFf0Gx+CzAg7be65DMNgaqAetFq3DT40UsG1tt2l7tRRD5+pjfaB57Ydo2VnMoKoOkGlew4xiOSOjDGqtBKJ+I9E= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by BN6PR18MB1521.namprd18.prod.outlook.com (2603:10b6:404:12b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.15; Fri, 13 May 2022 09:46:49 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::9c76:3b01:eb04:db4d]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::9c76:3b01:eb04:db4d%6]) with mapi id 15.20.5250.015; Fri, 13 May 2022 09:46:48 +0000 From: Akhil Goyal To: Gagandeep Singh , "dev@dpdk.org" , "hemant.agrawal@nxp.com" 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: AQHYWFsMGWwBtclSokevqE50NR5HuK0cq5jA Date: Fri, 13 May 2022 09:46:48 +0000 Message-ID: References: <20220425041423.2232034-1-g.singh@nxp.com> In-Reply-To: <20220425041423.2232034-1-g.singh@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ccc94fa3-addd-4a62-8df8-08da34c57fe2 x-ms-traffictypediagnostic: BN6PR18MB1521: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: 1+UxaooRiZE9oKJdakVX2r740HCmvIr2lrY0qmAmijkVEF4RSATD2ZgQ2Oi4AR1y3dv7rgJaBS0WInGxMt8HD1ptDN0xhFr1nwoH0gkwpov89XHOvpF9Chmm2hj53Vva3/hVv13rAFyM094bmnPN9FLs7zF0Pxo0B9m1NqXyxNruiME+/Dv9n8ZYOC0++DhVUkJiP+aYE73Du9FL6Rc0+TMoHEh0GRbk6ez30e6y62nCj8QRN1CNt15AnVOyryrN+Z/OQAySJqR+H7WaPJ82/UkmQsza/o9RqbSJtHd6J9o+VwWtxhcRf4JsXvuyQw3bsV2SK+iI382BWQl1nWtZVsmz70R6eTfcvpx/DYieUI+ZIAYe0ElW48wNM8hfYnsANK6Ebv5f1s/PDC7NERpVQHR339Bv48oNHRgiablms/FgqeLJXar2D981ntNGmzc1/l2NhPQLd7KO7Z5v8pG1QWp86Q8dmB2pijvBc9751rMq5GnXEUAWhxOHwOrlbCB+cIcwCUIAbFsWpJ1ytlLLkcbq9l7bgj7yP0nQmEmcW+0W8+ujjj3fVNw1+DiISZ2CZqmfv8p4jcU9OZ6FGTsJ10GTUMhlQBS4NoaUvVMD6BcGfSC6D5OIRLpbOwplu8AoZMzo9DvpS09E6ZNpJs1KxITt2v6UOlVzGlCwRfHyigYibU0W2XowUZhrsiKfoX1OPImFWC+88OC2hjvTAY4GDg== 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:(13230001)(4636009)(366004)(71200400001)(4326008)(186003)(508600001)(7696005)(8676002)(86362001)(55016003)(64756008)(66446008)(66556008)(66946007)(76116006)(66476007)(9686003)(6506007)(26005)(107886003)(33656002)(55236004)(83380400001)(2906002)(316002)(110136005)(38100700002)(38070700005)(8936002)(5660300002)(52536014)(122000001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?pY3wOYfPhcxt+eR9A2SZXFieXxUZsOgJuFfpFWeItyf5nB2/ydZHtR3+/Nbg?= =?us-ascii?Q?9qCHIcv3/PvrtR9b1/Um/JfveH697YKcZgXJBDSMSvEOliA47FonFFt6lmNx?= =?us-ascii?Q?m++ezXuGRZjhoJCkPyDRem0t4qDzPlBzdUru5iKXTiqcZEP3FdRdpOqPJGId?= =?us-ascii?Q?v8O970OBwP+4V+Xw3lfgq+rdKLV3U+Ng2X9582MVnRPoRw7kWrW0SF3mRTc9?= =?us-ascii?Q?piP0sh0EQCQt+8CJlj0cxHHCloB9hKuPavtLw6W/kLfbqMdbg/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6+IdQCNv3i+zuUY5FwvZcq1JTXGpVUdJThV5mYXE1?= =?us-ascii?Q?7oe1A5hSQOxXpNJ3XkF3DqDtrCWu6ozxFtwAmdiw9mS0GIc0pJw+nldFxTwM?= =?us-ascii?Q?B9CTZCn+Vdf/pZoTV5Z0TIRu+/7XomlIGNK0B+3npKXYpkIfq9hGu61d72MY?= =?us-ascii?Q?SqdAVuCgMTRljeCevv0idyi7ma9JWv4nGjMTrZcoEMU4k/4lkAVlv+rtqXyg?= =?us-ascii?Q?wJBJerxawITNPTHKaRppSBZnaLYYPMmNRTKB2N2smcadJ3qQRsuu/8TSZWlm?= =?us-ascii?Q?INSgjjxfKd8+BW6zT/pPM8IBsZJKLU2mXElA+bfyxqvDhwiK4C5Zemw4R6yr?= =?us-ascii?Q?lWsAGHB0wT3ykDqEUSWlhlk/X/JRDyuklbLT4pCBE1QrJ2DBbAjTo+YFSR6P?= =?us-ascii?Q?9mgaXF/H1EWVALkBRlstSH1pjiBLCiqnyZhEnLmOoNneYPq8gAnoAeJX3j5I?= =?us-ascii?Q?+9xv8WlmjxCTDd3Hm0sJOHJ8uFSfZaSTNVlm+PquDEeCeAt0v9gYJ+cTMFjp?= =?us-ascii?Q?DDWG0amdTh7xhbin0YL0JYZnWst4awr9W0TEM8Q9pM60BdlI8q2TErWodF0H?= =?us-ascii?Q?vLA+gJ+ZEA=3D=3D?= 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: ccc94fa3-addd-4a62-8df8-08da34c57fe2 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2022 09:46:48.4477 (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: PedqyzZVA3mENnVq6NxjQHWEgo0Ot+LAqA72FmKYBUwV7srrSfsk/3S8Bq0NEa0ZC9Z2Q+YPl8fcDf5isavvrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR18MB1521 X-Proofpoint-GUID: cIRQfpZ1K9sa2CS35GEMJoBXTkxv5I_3 X-Proofpoint-ORIG-GUID: cIRQfpZ1K9sa2CS35GEMJoBXTkxv5I_3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-13_04,2022-05-12_01,2022-02-23_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 Hi Gagan, > Issue more dequeue commands if the gap between enqueued > and dequeued packets is more than burst size *8 >=20 > Signed-off-by: Gagandeep Singh > --- Why is this change required? What gain are we getting? I see a performance drop due to this patch. > app/test-crypto-perf/cperf_test_throughput.c | 42 +++++++++++--------- > 1 file changed, 23 insertions(+), 19 deletions(-) >=20 > diff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-cryp= to- > 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; >=20 > - > /* 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); > } >=20 > /* Dequeue any operations still in the crypto device */ > -- > 2.25.1