[PATCH v3 01/29] bpf: replace deprecated SMP barriers with C11 fences

Marat Khalili qm2k21 at gmail.com
Tue Oct 13 23:11:21 CEST 2026


> 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).


More information about the dev mailing list