DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stanislaw Kardach <kda@semihalf.com>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: dev@dpdk.org, Stanislaw Kardach <kda@semihalf.com>
Subject: [dpdk-dev] [PATCH v2 1/3] test: disable no-huge test with PA IOVA
Date: Fri,  4 Jun 2021 16:15:59 +0200	[thread overview]
Message-ID: <20210604141601.275430-2-kda@semihalf.com> (raw)
In-Reply-To: <20210604141601.275430-1-kda@semihalf.com>

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 <kda@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


  reply	other threads:[~2021-06-04 14:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 14:15 [dpdk-dev] [PATCH v2 0/3] Increase test compatibility " Stanislaw Kardach
2021-06-04 14:15 ` Stanislaw Kardach [this message]
2021-06-04 14:16 ` [dpdk-dev] [PATCH v2 2/3] test: disable no-huge where it's not necessary Stanislaw Kardach
2021-06-04 14:16 ` [dpdk-dev] [PATCH v2 3/3] test: fix the -n unit test description Stanislaw Kardach
2021-06-10  7:51 ` [dpdk-dev] [PATCH v2 0/3] Increase test compatibility with PA IOVA Stanislaw Kardach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210604141601.275430-2-kda@semihalf.com \
    --to=kda@semihalf.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).