DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] eal: choose IOVA mode according to compilation flags
@ 2023-04-12 17:19 Viacheslav Ovsiienko
  2023-04-12 19:12 ` Morten Brørup
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Viacheslav Ovsiienko @ 2023-04-12 17:19 UTC (permalink / raw)
  To: dev; +Cc: thomas, david.marchand

The DPDK can be compiled to be run in IOVA VA mode with
'enable_iova_as_pa=false' meson option. If there is no
explicit EAL --iova-mode parameter specified in the command
line the rte_eal_init() tried to deduce  VA or PA mode without
taking into account the above mentioned compile time option,
resulting into initialization failure.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 lib/eal/linux/eal.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index c37868b7f0..4481bc4ad8 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -1080,7 +1080,10 @@ rte_eal_init(int argc, char **argv)
 		if (iova_mode == RTE_IOVA_DC) {
 			RTE_LOG(DEBUG, EAL, "Buses did not request a specific IOVA mode.\n");
 
-			if (!phys_addrs) {
+			if (!RTE_IOVA_IN_MBUF) {
+				iova_mode = RTE_IOVA_VA;
+				RTE_LOG(DEBUG, EAL, "IOVA VA mode is forced by build option.\n");
+			} else if (!phys_addrs) {
 				/* if we have no access to physical addresses,
 				 * pick IOVA as VA mode.
 				 */
-- 
2.18.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-06-12 17:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 17:19 [PATCH] eal: choose IOVA mode according to compilation flags Viacheslav Ovsiienko
2023-04-12 19:12 ` Morten Brørup
2023-04-13  9:42   ` Slava Ovsiienko
2023-06-06 15:15 ` [PATCH v2] " Viacheslav Ovsiienko
2023-06-06 15:23   ` Bruce Richardson
2023-06-07 16:48     ` Thomas Monjalon
2023-06-08 15:45 ` [PATCH v3] " Viacheslav Ovsiienko
2023-06-12 17:41   ` Thomas Monjalon

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).