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 5FC0A42997; Thu, 20 Apr 2023 14:22:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E364540A4B; Thu, 20 Apr 2023 14:22:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id CA1D740687 for ; Thu, 20 Apr 2023 14:22:37 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33KB5T6j031087; Thu, 20 Apr 2023 05:22:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=0rl83XOMnXfLHdlhRYFi54A7kOP0nmAdbvjAM5S6jYw=; b=dPz4d9SSOin6795pmAf5kW1SZvJZXIKd/yrgHHweqCy4AP9EYhcFJ1Rvsanao4OfDGya GZU/lfqStAfTwW9IQwpOG6Web0MO2qQw85os2OMeGTnbpyK4s3ooy8lkdpxQS8E8n1y7 RLTvNdbV3KNmcG1dW35vrH+BSnv0S3kmZ6P+OMkDLUulNdgFxCl6dQvQzgRNQ3PNXSEV AJzuatyYEFmsRqoCqdIHeiyCGN0kdEU9vhQLnkcN1AdLXD3cNDTnSJjHYe0PCiQBvEIw XBhQ6BHBMHNPGRspB4F1LXaODt3qgbZM1/pim04P21oxPWZBV9+2PzFDt348d+8blyQ1 lw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3q29180911-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 20 Apr 2023 05:22:36 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 20 Apr 2023 05:22:34 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 20 Apr 2023 05:22:34 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.193.84.139]) by maili.marvell.com (Postfix) with ESMTP id AA3673F707C; Thu, 20 Apr 2023 05:22:32 -0700 (PDT) From: Anoob Joseph To: Ciara Power , Akhil Goyal CC: Jerin Jacob , Tejasree Kondoj , Subject: [PATCH v2] app/crypto-perf: check crypto result Date: Thu, 20 Apr 2023 17:52:31 +0530 Message-ID: <20230420122231.140-1-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230420103224.830-1-anoobj@marvell.com> References: <20230420103224.830-1-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: oCjFkmoPMBn3aFkEUnqZWELK9rhalXYL X-Proofpoint-ORIG-GUID: oCjFkmoPMBn3aFkEUnqZWELK9rhalXYL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-20_08,2023-04-20_01,2023-02-09_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 Check crypto result in latency tests. Checking result won't affect the test results as latency is calculated using timestamps which are done before enqueue and after dequeue. Ignoring result means the data can be false positive. Signed-off-by: Anoob Joseph --- v2: - Improved result check (treat all non success as errors) app/test-crypto-perf/cperf_test_latency.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c index 406e082e4e..f1676a9aa9 100644 --- a/app/test-crypto-perf/cperf_test_latency.c +++ b/app/test-crypto-perf/cperf_test_latency.c @@ -134,6 +134,7 @@ cperf_latency_test_runner(void *arg) uint16_t test_burst_size; uint8_t burst_size_idx = 0; uint32_t imix_idx = 0; + int ret = 0; static uint16_t display_once; @@ -258,10 +259,16 @@ cperf_latency_test_runner(void *arg) } if (likely(ops_deqd)) { - /* Free crypto ops so they can be reused. */ - for (i = 0; i < ops_deqd; i++) + for (i = 0; i < ops_deqd; i++) { + struct rte_crypto_op *op = ops_processed[i]; + + if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) + ret = -1; + store_timestamp(ops_processed[i], tsc_end); + } + /* Free crypto ops so they can be reused. */ rte_mempool_put_bulk(ctx->pool, (void **)ops_processed, ops_deqd); @@ -289,8 +296,14 @@ cperf_latency_test_runner(void *arg) tsc_end = rte_rdtsc_precise(); if (ops_deqd != 0) { - for (i = 0; i < ops_deqd; i++) + for (i = 0; i < ops_deqd; i++) { + struct rte_crypto_op *op = ops_processed[i]; + + if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) + ret = -1; + store_timestamp(ops_processed[i], tsc_end); + } rte_mempool_put_bulk(ctx->pool, (void **)ops_processed, ops_deqd); @@ -301,6 +314,10 @@ cperf_latency_test_runner(void *arg) } } + /* If there was any failure in crypto op, exit */ + if (ret) + return ret; + for (i = 0; i < tsc_idx; i++) { tsc_val = ctx->res[i].tsc_end - ctx->res[i].tsc_start; tsc_max = RTE_MAX(tsc_val, tsc_max); -- 2.25.1