On Tue, 10 Mar 2026 21:35:24 +0800
dangshiwei <[email protected]> wrote:

> RISC-V currently has no-op implementations of the rte_prefetch*
> functions. Use __builtin_prefetch() to allow the compiler to emit
> Zicbop prefetch instructions when the target supports them (GCC
> 13.1+, Clang 17.0.1+ with -march=rv*_zicbop).
> 
> The Zicbop extension has no cache-level hints, so rte_prefetch1()
> and rte_prefetch2() fall back to rte_prefetch0(). The volatile
> qualifier is stripped via uintptr_t cast to satisfy
> __builtin_prefetch()'s const void * parameter without triggering
> -Wdiscarded-qualifiers.
> 
> This replaces the abandoned v1 series by Daniel Gregory
> (Message-ID: [email protected])
> addressing reviewer feedback from Kardach and Hemminger.
> 
> Signed-off-by: dangshiwei <[email protected]>
> ---

There is another patch for x86 that does same thing.
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/

Would be good to have single common file for all arch.

Reply via email to