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 72139A00BE; Mon, 25 Apr 2022 06:15:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0761D41143; Mon, 25 Apr 2022 06:15:06 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2068.outbound.protection.outlook.com [40.107.22.68]) by mails.dpdk.org (Postfix) with ESMTP id 6B40541132 for ; Mon, 25 Apr 2022 06:15:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QVYtGWBFX10gS7ujQAHut3T4B0Ul8WmpOKR4p6851NepvtfjpiaoCQLEJxiT0tPLe75da/tGZolr+9efgU52EAfP360WuV8eJ7IHrCEFj/fQ1ElkQiUkqj/2YokxV2iO0EeZpOy/Ci9RmY9wzXxRM7OVyMYr9645/W0k11Jy+Xti04qJwkB93TSkjFPnOQHRvrOceHeGSEupPPq64N05RTE1CoS8XA9FHCn4SGUcZSZSbDLFcsq4JCYz1vmcoxWJSU+Z8OczPSlLtZCFqEI69OvYf+j6Sy1TJx0ji0HnTBObrHEMmEa7VM4rhdJfOpAHERXlkyaeZEIaJsNqbqQfYg== 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=tB2NKssP4Tl0LF0rZGGYouDA/1hqW2++HMunVkAlqtY=; b=NqmQTy2JrlCpqj4b1krfJVQu+o7GUlzGv57f6drgW2k+80WzzHMRt86OXye8ntfQIM3PCdgzpNf3ECdK29gXvLT3o13LB5ag9f7HqCRkRGRn4+aNUlGJbFsXSeo8opabRDXz75HrgnyztBBCAxzjJUqOBH7a9avZLWK08N9Ou1GpJodzv6c83Qhj7pv5WSDHhP3CuPKaZfZQIY5UuLQw9IDYTJ5GCqKrsNvk7O2Nd9irR3l0qH4oEjW/tnnthCjH8bjFeCc1PbqG/E7rBrGWEkKICnKz4yx+UXBtMvSVMvKcAYUhLBrYZOfMjmagF7WZmUrhx+mbi/bPRp2rYo+pNw== 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=tB2NKssP4Tl0LF0rZGGYouDA/1hqW2++HMunVkAlqtY=; b=VZLWUfyfrgnMBYcZMxZMP3IxZ5EQFXrM8+3hSQhtRRPfSxaikRj6sAXY1m8UlooBtnpHShEPpP32xH4vMXxFtHCme3GeOE0/vI1O3t++plWRiitgVOOtoWfCgr4rQOiA4XixGtQY9Ah+ygDq0cCHqcOdgPMc42mKxt2gxwTSnGI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by PA4PR04MB9416.eurprd04.prod.outlook.com (2603:10a6:102:2ab::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.21; Mon, 25 Apr 2022 04:15:03 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2%7]) with mapi id 15.20.5186.021; Mon, 25 Apr 2022 04:15:03 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Gagandeep Singh Subject: [PATCH 1/8] app/test-crypto-perf: improve dequeue logic Date: Mon, 25 Apr 2022 09:44:16 +0530 Message-Id: <20220425041423.2232034-1-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0165.apcprd01.prod.exchangelabs.com (2603:1096:4:28::21) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 90d2ad66-88e9-44b9-d124-08da26722b99 X-MS-TrafficTypeDiagnostic: PA4PR04MB9416: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: bpJ1ROkKo8sQQG0fbgk6Zi6dQqkOyL3heidRTN4bwQ2aTbqWUdQT894wcdzFvMytWjW6Q7GR3e9C6jV+7918J4ooVcMaa49hT5ayAQzOs8EqVn2ysI838kEbA0S7zSEbomqHL1yl/67B6FaWJaKbROCSvlyRXeY7Dp9o2Dfpa/T8+wxch0NjI+5MnGCBvP1GlrCijCvkqweitVNBMHePI8EWR+e6tkdgU8h3oxwO0wlEclX1AyW1/J8/dBvziOojD76ZepcVQLi9rLye1IGP22LU+NkIkNCtKl7qtDybhxdA1LNufiwxDyMNqi0YMtKYbFt65JcoDt53/lMVYm9saRxMak0L9UsS6oIRKQIuXyPARD2omIlSTy1tbO9Havu43b/jqbL+nfYD7Ne4hciTlJ9vUsl6RC7Yd2Y53v2VnjSdTxu3tQTC8+h+AUIwxQe71GT3yYJVo1mA7EZOUiaPSR5/kYiCiZW5ZVX7GNXjHGnEmGh1tPhwqWaaX6Zm/6RdXXuG6yHUJODMoMlix0tXEmhAW/6tRte97fJziwYHQcXsX0FtwQMC3KJ0XYCjOcejotv5bGO8B+UqKkWpt/O+VQPdFKTbS2AU4OEyi6ECLosIztC+h6FtSQkY9dePAieqThUMGg4xqtWkCzpWmdlAgyWsyjImWb3CSiBzcXcHqahBr4XlbqYZlECeRLTaa0n1TQvLi2mcGqs0mSRbxXxnCw== 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)(4326008)(66556008)(6666004)(2616005)(5660300002)(66946007)(6512007)(8936002)(26005)(2906002)(38350700002)(86362001)(1076003)(38100700002)(52116002)(508600001)(6486002)(83380400001)(66476007)(8676002)(186003)(316002)(55236004)(6506007)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ZTTxWgXov6O7CkHOcOZ2Fe4yyvSoDcH3LjcX6W8VfszQtl9EGOADEFx+teX9?= =?us-ascii?Q?mYb5WX144GFW5Q1YVXqeDsay6U+IL/GQIUNTB2CZINvEKLEm522ZLSGzryHK?= =?us-ascii?Q?vMRTVuAdlI2BShPJNdGyYUQLfABshF3O2WXEX5E7WzgAuBj7axIzn1c636Qs?= =?us-ascii?Q?IfqbQzSrpBiCY0HCehsYPgxncf9APWgvjiyca5mun9GyMh+t2XfkCsq7UEch?= =?us-ascii?Q?+qWss22l2c7leThKX1jsKHf8FWvGfOnBkzyM2Xp6770i0bScAx/QXA8cVnvr?= =?us-ascii?Q?dH6c70edKPS8550gK/s+AKnDefpWdLqRTbZ/vo415OezkjvDDX/q4GNJsm6o?= =?us-ascii?Q?VVAgvOpDhkzuMl4fzHS1MWMaSMM35xIc+1ZT846GZJDKDE6h9nPYHV5/rjrK?= =?us-ascii?Q?vK6l9iF0pioamS/nC5T8BYxTLtNpZCrnByJmCoeBgYKoQGETNbD/By9OfTS6?= =?us-ascii?Q?eGZgTCtvQ8irqjISxMdiRlltOO+2X6/QLZ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ghHVoFv6aRP7QATyeImdyqCt4tPohYilFePw6Ox7WRguDZNBmuCh+JK3Ofe7?= =?us-ascii?Q?KMljo8+MplzZVgvYv5nGwM7xPinDuP1tOwTQlsbji7a9VvrU9qSdSde8XQFF?= =?us-ascii?Q?Aa1CDwluwVQojwAS+zMpD8Ee8jr5iCs3j7uhh7fNOYM7gSH13VxPuJvXaZcj?= =?us-ascii?Q?PNYcPmCnxk5XkDwPpDxluJmJuMrIn/+Jd8cFN0j0MSoceCIPyLOgiQdmJgN7?= =?us-ascii?Q?p1B9SbNVg/q7zjcayi2JzdGti2qWOYrWKOxUtV6tbQg2D2xjYa4iIq2/VTAX?= =?us-ascii?Q?I5FEcTCAXLRimUvtguc9Mr7tIvH1W/miRHydcSoYydiSk5rUMGuLRN1GNJQ8?= =?us-ascii?Q?Z1G3MLjqNg=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 90d2ad66-88e9-44b9-d124-08da26722b99 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2022 04:15:02.9867 (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: zr5NF6s2EfVahlMlTGEyo53UmTqfRdEv0Sbi9U/3/aIFwGOkLsvC38I35EIxW3d1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9416 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 Issue more dequeue commands if the gap between enqueued and dequeued packets is more than burst size *8 Signed-off-by: Gagandeep Singh --- 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 = burst_size - ops_enqd; ops_enqd_total += ops_enqd; - /* Dequeue processed burst of ops from crypto device */ - ops_deqd = 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 += 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 = 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 += 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