[PATCH 1/1] examples/l2fwd-jobstats: add delay to show stats
Rakesh Kudurumalla
rkudurumalla at marvell.com
Fri Jul 26 07:37:57 CEST 2024
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 at 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
More information about the dev
mailing list