[PATCH 2/5] ring: use GCC builtin as alternative to rte_atomic32
Stephen Hemminger
stephen at networkplumber.org
Thu Jun 4 17:20:10 CEST 2026
On Thu, 4 Jun 2026 15:11:25 +0000
Konstantin Ananyev <konstantin.ananyev at huawei.com> wrote:
> > /**
> > * @internal This is a helper function that moves the producer/consumer head
> > * optimized for single threaded case
> > @@ -82,7 +81,7 @@ __rte_ring_headtail_move_head_st(struct rte_ring_headtail
> > *d,
> > /* Single producer: only this thread writes d->head,
> > * so a relaxed load is sufficient.
> > */
> > - *old_head = rte_atomic_load_explicit(&d->head,
> > rte_memory_order_relaxed);
> > + *old_head = rte_atomic_load_explicit(&d->head,
> > rte_memory_order_acquire);
>
> Not sure, why it had changed to 'acquire' here?
> Looks like just patch splitting mistake, no?
I should have kept it as relaxed for the first load.
More information about the dev
mailing list