[PATCH v3 01/29] bpf: replace deprecated SMP barriers with C11 fences
Stephen Hemminger
stephen at networkplumber.org
Wed Oct 14 00:05:11 CEST 2026
On Tue, 13 Oct 2026 22:11:21 +0100
Marat Khalili <qm2k21 at gmail.com> wrote:
> > I am not a language lawyer, but what I read is that C11 atomic fence
> > is defined to only guarantee ordering of atomic objects. Since the use
> > counter is not atomic in the original code, the replacement with
> > rte_atomic_thread_fence() is not the same as original asm.
> >
> > My patch made these atomic and that is why.
> >
> > Should have no impact in datapath.
> >
> > I will respin with better human oriented comments, I have developed
> > a distaste for AI prose. Reads like a lawyer wrote it.
> Just a small clarification: `use` is currently declared as atomic in
> main, so all simple reads and writes to it are seq_cst atomic (and
> simple increment is a pair of two seq_cst atomic operations).
Right and non-atomic access to a variable declared as type _Atomic
is not allowed by standard and several compilers complain about it.
More information about the dev
mailing list