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 A33DB4586A; Mon, 26 Aug 2024 10:54:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65BB8402A7; Mon, 26 Aug 2024 10:54:44 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 72A1440272 for ; Mon, 26 Aug 2024 10:54:42 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47Q5tZ4w032034; Mon, 26 Aug 2024 01:54:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pfpt0220; bh=GQNsZX576LOWhapgKtm/ivp kKwMvYPUzBhyf/EUgBHU=; b=jPcshHr0iKqJ9vx/jL8OoLtV2DCw91kB1QAyGwU bDZ8XHASIBUkmBU8lGUnj6AfxeYYs7DZqajBR/2ByOnBE9X6wivNERIiYJ+mz7Ma tiRAwzASjtY8odFA7gXxgqziqZRy+4L7hiRZTjO/PiHaPOhXeWd1wd1XAFy+l5gK 46w4nagvyDHiWSaNGwQuldn1OHlNATdgpiOiqRSjygbAWgLKALmSza/vGoUZN3sn Rj6rSX+GuxmpmYHFX3n+0u4D5DgCxf2/G6G4N6j19RUyyLDXKRKzWlEoeG/+6BG2 LeC4e0JaryQZSFpJOXPipwO1rpZDJqHqdmEdgrx9VaCIaJQ== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 418m030g8b-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Aug 2024 01:54:41 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 26 Aug 2024 01:54:37 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 26 Aug 2024 01:54:36 -0700 Received: from anoobj2204.marvell.com (unknown [10.28.34.118]) by maili.marvell.com (Postfix) with ESMTP id 20B313F704D; Mon, 26 Aug 2024 01:54:33 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Fan Zhang CC: Hemant Agrawal , Jerin Jacob , Aakash Sasidharan , Tejasree Kondoj , Vidya Sagar Velumuri , Subject: [PATCH 1/2] test/crypto: allow retries with stats test Date: Mon, 26 Aug 2024 08:54:21 +0000 Message-ID: <20240826085432.2480734-1-anoobj@marvell.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: d6tU0sUd3Nfqt060cFnHVWcr-aH666Hw X-Proofpoint-GUID: d6tU0sUd3Nfqt060cFnHVWcr-aH666Hw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-26_06,2024-08-23_01,2024-05-17_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 Stats need not be reflected instantly after the operation. Relax the test case to have retries to allow slower updates. Signed-off-by: Anoob Joseph --- app/test/test_cryptodev.h | 1 + app/test/test_cryptodev_security_ipsec.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/test/test_cryptodev.h b/app/test/test_cryptodev.h index b479ab8a2a..bb54a33d62 100644 --- a/app/test/test_cryptodev.h +++ b/app/test/test_cryptodev.h @@ -9,6 +9,7 @@ #define MAX_NUM_OPS_INFLIGHT (4096) #define MIN_NUM_OPS_INFLIGHT (128) #define DEFAULT_NUM_OPS_INFLIGHT (128) +#define TEST_STATS_RETRIES (100) #define DEFAULT_NUM_XFORMS (2) #define NUM_MBUFS (8191) diff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c index 1aba1ad993..e6a81ca186 100644 --- a/app/test/test_cryptodev_security_ipsec.c +++ b/app/test/test_cryptodev_security_ipsec.c @@ -1103,9 +1103,12 @@ test_ipsec_stats_verify(void *ctx, enum rte_security_ipsec_sa_direction dir) { struct rte_security_stats stats = {0}; - int ret = TEST_SUCCESS; + int retries = 0, ret = TEST_SUCCESS; if (flags->stats_success) { +stats_get: + ret = TEST_SUCCESS; + if (rte_security_session_stats_get(ctx, sess, &stats) < 0) return TEST_FAILED; @@ -1118,6 +1121,12 @@ test_ipsec_stats_verify(void *ctx, stats.ipsec.ierrors != 0) ret = TEST_FAILED; } + + if (ret == TEST_FAILED && retries < TEST_STATS_RETRIES) { + retries++; + rte_delay_ms(1); + goto stats_get; + } } return ret; -- 2.45.2