[PATCH 09/11] test/ring: disable problematic tests for RISC-V
Stephen Hemminger
stephen at networkplumber.org
Thu May 5 19:35:16 CEST 2022
On Thu, 5 May 2022 19:30:01 +0200
Stanislaw Kardach <kda at 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 <kda at semihalf.com>
> Sponsored-by: Frank Zhao <Frank.Zhao at starfivetech.com>
> Sponsored-by: Sam Grove <sam.grove at 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.
More information about the dev
mailing list