patches for DPDK stable branches
 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>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 1/3] test: disable no-huge test with PA IOVA
Date: Mon, 12 Apr 2021 12:06:43 +0200
Message-ID: <20210412100645.668395-2-kda@semihalf.com> (raw)
In-Reply-To: <20210412100645.668395-1-kda@semihalf.com>

On linux systems without IOMMU support available (be it lack of
supported IOMMU or lack of IOMMU support in kernel), the IOVA mapping
will default to DMA with physical addresses. This implicitly requires
hugepage support (most prominently for performance reasons).
Therefore trying to run the eal_flags_no_huge_autotest in such scenario
is not a valid requirement.

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 available
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>
Cc: stable@dpdk.org
---
 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 932fbe3d0..462dc6384 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-04-12 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210412100645.668395-1-kda@semihalf.com>
2021-04-12 10:06 ` Stanislaw Kardach [this message]
2021-04-12 10:06 ` [dpdk-stable] [PATCH 2/3] test: disable no-huge where it's not necessary Stanislaw Kardach
2021-04-12 10:06 ` [dpdk-stable] [PATCH 3/3] test: fix the -n unit test description 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=20210412100645.668395-2-kda@semihalf.com \
    --to=kda@semihalf.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git