|WARNING| eal/arm: skip ISB for precise counter reads with ECV
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Nov 23 14:08:40 CET 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/173111
_AI Code Review_
warning: review has no Review-Result line, severity inferred from prose (response may be truncated)
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-23
**Warnings**
1. **New global variable exported as stable ABI (`lib/eal/arm/rte_cycles.c`)**
```c
RTE_EXPORT_SYMBOL(rte_arm64_ecv)
bool rte_arm64_ecv;
```
This adds a new public symbol, and it is exported directly into the stable ABI.
Because `rte_rdtsc_precise()` is inlined into applications, the variable can never be renamed, retyped or removed without an ABI break.
- New API should go through the experimental phase. Use `RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_arm64_ecv, <current release>)`.
- Alternatively, avoid exporting a raw data symbol at all and fold the flag into an existing exported structure or accessor.
2. **Missing release notes**
The patch adds a public CPU flag (`RTE_CPUFLAG_ECV` in `enum rte_cpu_flag_t`) and a new exported symbol.
It also changes the behaviour of `rte_rdtsc_precise()` on ECV-capable CPUs.
Add an entry to the current release notes.
**Info**
1. **ECV detection is a side effect of `get_tsc_freq_arch()` (`lib/eal/arm/rte_cycles.c`)**
```c
rte_arm64_ecv = rte_cpu_get_flag_enabled(RTE_CPUFLAG_ECV) > 0;
```
Hiding CPU feature detection inside a frequency query couples two unrelated things.
Any EAL path that does not call this function leaves the flag false.
This is safe because it falls back to ISB, but the fast path is lost silently.
An `RTE_INIT()` constructor would decouple it and set the flag before `rte_eal_init()` as well.
`rte_cpu_get_flag_enabled()` only reads auxv/hwcaps, so it is usable there.
2. **Symbol defined on 32-bit Arm builds (`lib/eal/arm/rte_cycles.c`)**
```c
#ifndef RTE_ARM_FEATURE_ECV
RTE_EXPORT_SYMBOL(rte_arm64_ecv)
bool rte_arm64_ecv;
#endif
```
The definition is guarded only by `RTE_ARM_FEATURE_ECV`, not `RTE_ARCH_
More information about the test-report
mailing list