> On Dec 1, 2026, at 10:57 AM, Konstantin Ananyev > <[email protected]> wrote: > > Just to understand: so we'll have all other dpdk binaries build without > RM_FEATURE_ATOMICS, > i.e. not allowed to use stadd/swapl instructions, but we still want to > generate bpf binary code > that would use these instructions, correct?
A generic build already uses LSE atomics at runtime for all <128-bit operations: the compiler builds the __atomic_* builtins with outlined helpers (-moutline-atomics, default since GCC 10), which select LSE or LL/SC based on HWCAP at startup. __ARM_FEATURE_ATOMICS is only defined when the target guarantees LSE (armv8.1-a and later, or armv8-a+lse), so an armv8-a generic build never sets it - runtime detection is the only way such a build can use LSE. This series just extends that to the two places that bypass the compiler: the hand-written 128-bit CAS in EAL (patch 2) and the JIT-generated atomics here, same as the Linux kernel arm64 eBPF JIT does. LL/SC loops have no forward-progress guarantee under contention, which is one of the reasons -moutline-atomics became the default.
smime.p7s
Description: S/MIME cryptographic signature

