On Linux systems without IOMMU support available (be it lack of supported IOMMU or lack of IOMMU support in kernel or explicit --no-huge EAL parameter), the IOVA mapping will default to DMA with physical addresses. This implicitly requires hugepage support to work (checked in rte_eal_using_phys_addrs). Therefore trying to run the eal_flags_no_huge_autotest in such scenario is not a valid requirement. This issue was discovered on RISC-V arch.
To verify this even on x86 do (output from i5-10210U): $ ./app/test/dpdk-test -m 18 --iova-mode=pa --no-huge EAL: Detected 8 lcore(s) EAL: Detected 1 NUMA nodes EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: FATAL: Cannot use IOVA as 'PA' since physical addresses are not ... EAL: Cannot use IOVA as 'PA' since physical addresses are not available While doing: $ sudo ./app/test/dpdk-test --iova-mode=pa EAL: Detected 8 lcore(s) EAL: Detected 1 NUMA nodes EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'PA' EAL: No available 1048576 kB hugepages reported EAL: Probing VFIO support... EAL: VFIO support initialized TELEMETRY: No legacy callbacks, legacy socket not created APP: HPET is not enabled, using TSC as default timer RTE>> This commit finishes the above test early with SKIP status to signify that no-huge support is simply not available. Signed-off-by: Stanislaw Kardach <k...@semihalf.com> --- app/test/test_eal_flags.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 932fbe3d08..462dc63842 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -756,6 +756,15 @@ test_no_huge_flag(void) #else const char * prefix = "--file-prefix=nohuge"; #endif +#ifdef RTE_EXEC_ENV_LINUX + /* EAL requires hugepages for RTE_IOVA_PA operation on linux. + * The test application is run with RTE_IOVA_DC, so if at this point we + * get RTE_IOVA_PA, it means that newly spawned process will also get + * it. + */ + if (rte_eal_iova_mode() == RTE_IOVA_PA) + return TEST_SKIPPED; +#endif /* With --no-huge */ const char *argv1[] = {prgname, prefix, no_huge}; -- 2.27.0