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 07BC242996; Thu, 20 Apr 2023 12:32:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 633F642D12; Thu, 20 Apr 2023 12:32:33 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 4881142D0E for ; Thu, 20 Apr 2023 12:32:32 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33KA0kRd009597; Thu, 20 Apr 2023 03:32:31 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=8Fqz2D2QPL/psEo/s1JZNNTlZ8sJx9gnh9kECGJjiSA=; b=Ze0q8Yp+Jt0dtWS/JlFje5pImEGywWtNtvaOVklpWAVMWkVYE57gfk3Yud45r1j/49bX 81Z+7jLrAOBRpgHPgF2x6xIK07QySrWmFViGlt7C7ANvADaYkIMckLxeGvzPlJEmTxNs GzRPTqNA7uQt2OXrf8d6HA0ZaXKMZ68mtb/GQ4O60NwFgFSnJQMcp3KOZM/n16Zejcl6 51ZYZ5z8i8GyPOY4L/HcrGdVSkCZcu+UP16xMcTWqa9ljnfaqkFitTDVLqKxo6U6EQzX IZj8N9CEtj3FpShnVrNmtFApBx0UYyg5tzA5GPycwmxBg0ngTsI46FmhMobV77CqFj+u AQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3q3392r77q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 20 Apr 2023 03:32:31 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 20 Apr 2023 03:32:29 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 20 Apr 2023 03:32:29 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.28.161.183]) by maili.marvell.com (Postfix) with ESMTP id 74B423F703F; Thu, 20 Apr 2023 03:32:27 -0700 (PDT) From: Anoob Joseph To: Ciara Power , Akhil Goyal CC: Jerin Jacob , Tejasree Kondoj , Subject: [PATCH] app/crypto-perf: check crypto result Date: Thu, 20 Apr 2023 16:02:24 +0530 Message-ID: <20230420103224.830-1-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: oce4EG18N32AUa0UDQbjnTeXMN9rXjor X-Proofpoint-ORIG-GUID: oce4EG18N32AUa0UDQbjnTeXMN9rXjor 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_06,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 --- 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..64bef2cc0e 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_ERROR) + 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_ERROR) + 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