On Thu, 2 May 2024 18:44:20 +0100 Daniel Gregory <daniel.greg...@bytedance.com> wrote:
> What toolchain are you using? With your change I still get errors about > the expression not being constant: > > In file included from ../lib/eal/arm/include/rte_pause.h:13, > from ../lib/eal/include/generic/rte_spinlock.h:25, > from ../lib/eal/arm/include/rte_spinlock.h:17, > from ../lib/telemetry/telemetry.c:20: > ../lib/eal/arm/include/rte_pause_64.h: In function ‘rte_wait_until_equal_16’: > ../lib/eal/arm/include/rte_pause_64.h:156:23: error: expression in static > assertion is not constant > 156 | static_assert(__builtin_constant_p(memorder), "memory order > is not a constant"); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > I'm cross-compiling with GCC v12.2 using the > config/arm/arm64_armv8_linux_gcc cross-file, and enabling > RTE_ARM_USE_WFE by uncommenting it in config/arm/meson.build and setting > its value to true. The problem with your patch is that checking at runtime generates additional instructions in the critical path. Looks like more of a compiler bug.