On Wed, 1 May 2024 17:25:59 +0100
Ferruh Yigit <ferruh.yi...@amd.com> wrote:

> >  - Do not mark statistics as volatile.
> >    Instead, READ_ONCE() where necessary.
> >   
> 
> I did similar [1], and Mattias has some comments on it.
> Issue is not in the reader (stats_get) side. Without volatile writer
> (datapath thread) may end up *not* storing updated stats to memory.
> 
> For reader side, I expect value not been in the register when function
> called, so it ends up reading from memory, which doesn't require
> volatile casting.

These are per-queue stats, and anybody foolish enough to have multiple
threads sharing same queue without locking is playing with fire.
It is documented that DPDK PMD's don't support that.

Reply via email to