DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: use LSE atomics when available
@ 2026-11-30 16:33 Nick Hudson
  2026-11-30 16:33 ` [PATCH 1/3] mailmap: add new contributor Nick Hudson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nick Hudson @ 2026-11-30 16:33 UTC (permalink / raw)
  To: dev; +Cc: Nick Hudson

Two improvements for AArch64 atomics:

Patch 2 reworks the 128-bit compare-exchange in EAL. When the build
does not guarantee LSE (__ARM_FEATURE_ATOMICS / RTE_ARM_FEATURE_ATOMICS
not defined), use the compiler's AArch64 outlined atomic helpers
(__aarch64_cas16_*) so LSE vs LL/SC is selected at runtime from HWCAP,
instead of always falling back to the LL/SC loop. Builds that guarantee
LSE keep the inline CASP implementation; older toolchains without
outlined helpers keep the LL/SC fallback.

Patch 3 makes the BPF arm64 JIT query the ATOMICS CPU flag at runtime
when the build does not guarantee LSE, so JIT-generated code can use
stadd/swpal on capable hardware instead of being limited by build-time
flags.

Tested on an LSE-capable aarch64 VM (Ubuntu 26.04, GCC 15.2) with both
a -Dplatform=generic build (outlined helper path, verified calls to
__aarch64_cas16_* in disassembly) and a -Dplatform=n1sdp build (inline
casp/caspa/caspl/caspal). atomic_autotest, bpf_autotest and
bpf_atomic_imms_autotest pass on both.

Nick Hudson (3):
  mailmap: add new contributor
  eal: select 128-bit CAS by LSE support
  bpf/arm64: detect atomics at build time or runtime

 .mailmap                            |  1 +
 lib/bpf/bpf_jit_arm64.c             | 10 +++++-----
 lib/eal/arm/include/rte_atomic_64.h | 29 +++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 5 deletions(-)

-- 
2.54.0 (Apple Git-157)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-12-05 18:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 16:33 [PATCH 0/3] arm64: use LSE atomics when available Nick Hudson
2026-11-30 16:33 ` [PATCH 1/3] mailmap: add new contributor Nick Hudson
2026-11-30 16:33 ` [PATCH 2/3] eal: select 128-bit CAS by LSE support Nick Hudson
2026-11-30 16:33 ` [PATCH 3/3] bpf/arm64: detect atomics at build time or runtime Nick Hudson
2026-12-01 10:57   ` Konstantin Ananyev
2026-12-01 13:11     ` Hudson, Nick
2026-12-05 18:31   ` Marat Khalili

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox