DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] examples/l2fwd-jobstats: add delay to show stats
@ 2024-07-26  5:37 Rakesh Kudurumalla
  2024-07-29  6:10 ` [PATCH v2 " Rakesh Kudurumalla
  2024-07-29  6:20 ` [PATCH v2 1/1] examples/l2fwd-jobstats: add delay to show stats Rakesh Kudurumalla
  0 siblings, 2 replies; 12+ messages in thread
From: Rakesh Kudurumalla @ 2024-07-26  5:37 UTC (permalink / raw)
  Cc: dev, jerinj, ndabilpuram, Rakesh Kudurumalla

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 <rkudurumalla@marvell.com>
---
 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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-08-16  5:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-26  5:37 [PATCH 1/1] examples/l2fwd-jobstats: add delay to show stats Rakesh Kudurumalla
2024-07-29  6:10 ` [PATCH v2 " Rakesh Kudurumalla
2024-07-30 10:03   ` [PATCH v3 1/1] examples/l2fwd-jobstats: fix lock availability Rakesh Kudurumalla
2024-07-30 16:12     ` Thomas Monjalon
2024-08-08 11:41       ` [EXTERNAL] " Rakesh Kudurumalla
2024-08-08 12:22         ` Thomas Monjalon
2024-08-11 16:00           ` Rakesh Kudurumalla
2024-08-11  6:58     ` [PATCH v4 " Rakesh Kudurumalla
2024-08-11 15:59       ` [PATCH v5 " Rakesh Kudurumalla
2024-08-11 16:17         ` Stephen Hemminger
2024-08-16  5:25           ` [EXTERNAL] " Rakesh Kudurumalla
2024-07-29  6:20 ` [PATCH v2 1/1] examples/l2fwd-jobstats: add delay to show stats Rakesh Kudurumalla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).