On Thu,  5 May 2022 19:30:01 +0200
Stanislaw Kardach <k...@semihalf.com> wrote:

> When compiling for RISC-V in debug mode the large amount of inlining in
> test_ring_basic_ex() and test_ring_with_exact_size() (in test_ring.c)
> leads to large loop bodies. This causes 'goto' and 'for' loop
> PC-relative jumps generated by the compiler to go beyond the architecture
> limitation of +/-1MB offset (the 'j <offset>' instruction). This
> instruction should not be generated by the compiler since C language does
> not limit the maximum distance for 'goto' or 'for' loop jumps.
> 
> This only happens in the unit test for ring which tries to perform long
> loops with ring enqueue/dequeue and it seems to be caused by excessive
> __rte_always_inline usage. ring perf test compiles just fine under
> debug.
> 
> To work around this, disable the offending tests in debug mode.
> 
> Signed-off-by: Stanislaw Kardach <k...@semihalf.com>
> Sponsored-by: Frank Zhao <frank.z...@starfivetech.com>
> Sponsored-by: Sam Grove <sam.gr...@sifive.com>
> ---

It seems to me that fixing the excessive inlining in the ring code
could benefit all architectures, rather than neutering the tests
on RISCV.

Reply via email to