Service core statistics MT safety
Honnappa Nagarahalli
Honnappa.Nagarahalli at arm.com
Mon Jun 27 19:39:35 CEST 2022
<snip>
>
> > From: Mattias Rönnblom [mailto:mattias.ronnblom at 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
More information about the dev
mailing list