[PATCH v2 08/19] mempool: use rte optional stdatomic API
Konstantin Ananyev
konstantin.v.ananyev at yandex.ru
Tue Oct 24 10:47:29 CEST 2023
17.10.2023 21:31, Tyler Retzlaff пишет:
> Replace the use of gcc builtin __atomic_xxx intrinsics with
> corresponding rte_atomic_xxx optional stdatomic API
>
> Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> ---
> lib/mempool/rte_mempool.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
> index f70bf36..df87cd2 100644
> --- a/lib/mempool/rte_mempool.h
> +++ b/lib/mempool/rte_mempool.h
> @@ -327,8 +327,8 @@ struct rte_mempool {
> if (likely(__lcore_id < RTE_MAX_LCORE)) \
> (mp)->stats[__lcore_id].name += (n); \
> else \
> - __atomic_fetch_add(&((mp)->stats[RTE_MAX_LCORE].name), \
> - (n), __ATOMIC_RELAXED); \
> + rte_atomic_fetch_add_explicit(&((mp)->stats[RTE_MAX_LCORE].name), \
> + (n), rte_memory_order_relaxed); \
> } while (0)
> #else
> #define RTE_MEMPOOL_STAT_ADD(mp, name, n) do {} while (0)
Acked-by: Konstantin Ananyev <konstantin.v.ananyev at yandex.ru>
More information about the dev
mailing list