[PATCH v6 1/1] examples/l2fwd-jobstats: fix timer stats display with lock contention
Stephen Hemminger
stephen at networkplumber.org
Mon Mar 2 16:48:04 CET 2026
On Mon, 2 Mar 2026 11:48:05 +0530
rkudurumalla <rkudurumalla at marvell.com> wrote:
> From: Rakesh Kudurumalla <rkudurumalla at marvell.com>
>
> Race condition between jobstats and time metrics
> for forwarding and flushing is maintained using spinlock.
> Timer metrics are not displayed properly due to the
> frequent unavailability of the lock.
>
> This patch fixes the issue by introducing a delay before
> acquiring the lock in the loop. This delay allows for better
> availability of the lock, ensuring that show_lcore_stats() can
> periodically update the statistics even when forwarding
> jobs are running.
>
> Fixes: 204896f8d66c ("examples/l2fwd-jobstats: add new example")
> Cc: stable at dpdk.org
>
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla at marvell.com>
This does fix the problem, but this whole application seems like
it is using an unusual architecture. The main loop per thread
spends most of its time updating job stats and only periodically
calls the actual rx/tx burst forwarding. That is upside down??
More information about the dev
mailing list