On 2022-06-27 19:39, Honnappa Nagarahalli wrote:
<snip>

From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com]
Sent: Monday, 27 June 2022 13.06

Hi.

Is it safe to enable stats on MT safe services?

https://github.com/DPDK/dpdk/blob/main/lib/eal/common/rte_service.c#L3
6
6

It seems to me this would have to be an __atomic_add for this code to
produce deterministic results.

I agree. The same goes for the 'calls' field.
The calling function does the locking. 
https://github.com/DPDK/dpdk/blob/main/lib/eal/common/rte_service.c#L398

For more information you can look at: 
https://github.com/DPDK/dpdk/blob/main/lib/eal/include/rte_service.h#L120


What about the
https://github.com/DPDK/dpdk/blob/main/lib/eal/common/rte_service.c#L404
call (for MT safe services)?

There's no lock held there.

Reply via email to