[RFC PATCH] eal/riscv: add support for zawrs extension

Sun Yuechi sunyuechi at iscas.ac.cn
Sat Sep 26 16:38:11 CEST 2026


Hi Daniel,

This RFC has been sitting for a while. I tested it on an RVA23 board
(SpacemiT K3, Zawrs present) and it works: over a 200 ms wait, wrs.nto
woke up 53 times vs 14.6M spins with pause, hand-off latency is the same,
and the lock/ring/atomic autotests pass.

To move it forward it needs:

- rebase
- build-time detection via __riscv_zawrs, like the V extension in
  config/riscv/meson.build, instead of the manual meson flag; this also
  answers Stanisław's question about extension detection
- int memorder -> rte_memory_order memorder
- RTE_WAIT_UNTIL_MASKED: the alignment assert is inverted (!= 0 -> == 0)
- do a plain load before taking the reservation; always starting with
  lr costs ~10% on the uncontended MP/MC ring path (ring_perf_autotest)
- release notes and a note in cross_build_dpdk_for_riscv.rst

If you are still interested, please send a v2 within a month (a short
window only because the patch has been idle for over two years; if you
need more time, just say so). Otherwise I will send a v2 with these
changes, keeping your authorship.

Thanks,
Sun Yuechi



More information about the dev mailing list