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 AE41E456B6; Fri, 26 Jul 2024 07:38:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CA6A41060; Fri, 26 Jul 2024 07:38:28 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 0AF6E402AE for ; Fri, 26 Jul 2024 07:38:26 +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 46Q2O2uH008643 for ; Thu, 25 Jul 2024 22:38:25 -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=id4jUKvRFt8Onda3xm1to2z AFDtiE5xRsdFRaRooDRw=; b=Nez5EqxflDR3fd6+TOfrpLoyJHbNx3yrNOM0CgK 4y5IRclO/dbyadPQK2HBvFAniaFTpdJRtcc7ST0MvJlWaPVdcC5jjAARWwxYLP2Y 9xJm3XOKRZe2gjHnptUBUqvGcpZX3rHMCYFa6Q5JzrsutBFjpYR1iBaKILU6ACsz MRCFYKIbk70y8/E7nUJtD0baDfjLe4wamw0tWMSAHrzi3A1Bn3OMN0vAnUc/oCVa 2mPUwvXs42fqWnpr48vHAVexxyEZuplcGNcAEOjeg3b/I7tcnXXM1oZlYVxA8h6c RmgAoib8crhLkzSB40yTcUqvJ/Q5S4PwK74eWq39MYy6hJQ== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 40m2yf0h6m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 25 Jul 2024 22:38:24 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 25 Jul 2024 22:38:04 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 25 Jul 2024 22:38:04 -0700 Received: from localhost.localdomain (unknown [10.28.36.154]) by maili.marvell.com (Postfix) with ESMTP id 9D16D3F707A; Thu, 25 Jul 2024 22:38:02 -0700 (PDT) From: Rakesh Kudurumalla To: CC: , , , "Rakesh Kudurumalla" Subject: [PATCH 1/1] examples/l2fwd-jobstats: add delay to show stats Date: Fri, 26 Jul 2024 11:07:57 +0530 Message-ID: <20240726053757.3653673-1-rkudurumalla@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: lnZhvvDrh-BX-K5GDtktqcMs9e7SlSnV X-Proofpoint-ORIG-GUID: lnZhvvDrh-BX-K5GDtktqcMs9e7SlSnV 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-07-26_03,2024-07-25_03,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 In main_loop function only one lock is acquired before fwd jobs has started and finished and then lock is released. Due to this most of the time lock is not available for show_lcore_stats() as a result stats are not updated periodically. This patch fixes the same by adding delay before accquring lock in loop Signed-off-by: Rakesh Kudurumalla --- examples/l2fwd-jobstats/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c index 308b8edd20..7bb38b290f 100644 --- a/examples/l2fwd-jobstats/main.c +++ b/examples/l2fwd-jobstats/main.c @@ -542,7 +542,7 @@ l2fwd_main_loop(void) } while (likely(stats_read_pending == 0)); rte_spinlock_unlock(&qconf->lock); - rte_pause(); + rte_delay_us(10); } /* >8 End of minimize impact of stats reading. */ } -- 2.25.1