Skip to contentSkip to conversation

eal: add warning for incompatibe requested IOVA mode

PATCH Applied Viacheslav Ovsiienko 3 participants 3 messages Jun 6, 2023 – Jun 12, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eal: add warning for incompatibe requested IOVA mode

The DPDK can be compiled to be run in IOVA VA mode with 'enable_iova_as_pa=false' meson option. It disables support of the physical address field in the mbufs and application can not be run in 'IOVA as PA mode'.

The patch adds warning if some bus requires the 'IOVA as PA' mode in runtime and the 'enable_iova_as_pa=false' meson option was configured on build.

---
 lib/eal/common/eal_common_bus.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
lib/eal/common/eal_common_bus.c +6 -2
index deb9fb8a12..acac14131a 100644
@@ -239,9 +239,13 @@ rte_bus_get_iommu_class(void)
 			rte_bus_name(bus),
 			bus_iova_mode == RTE_IOVA_DC ? "DC" :
 			(bus_iova_mode == RTE_IOVA_PA ? "PA" : "VA"));
-		if (bus_iova_mode == RTE_IOVA_PA)
+		if (bus_iova_mode == RTE_IOVA_PA) {
 			buses_want_pa = true;
-		else if (bus_iova_mode == RTE_IOVA_VA)
+			if (!RTE_IOVA_IN_MBUF)
+				RTE_LOG(WARNING, EAL,
+					"Bus %s wants IOVA as PA not compatible with 'enable_iova_as_pa=false' build option.\n",
+					rte_bus_name(bus));
+		} else if (bus_iova_mode == RTE_IOVA_VA)
 			buses_want_va = true;
 	}
 	if (buses_want_va && !buses_want_pa) {
Signature · 1 line
2.18.1
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Viacheslav Ovsiienko

The DPDK can be compiled to be run in IOVA VA mode with 'enable_iova_as_pa=false' meson option. It disables support of the physical address field in the mbufs and application can not be run in 'IOVA as PA mode'.

The patch adds warning if some bus requires the 'IOVA as PA' mode in runtime and the 'enable_iova_as_pa=false' meson option was configured on build.

---

Signature · 2 lines
Thanks,
Anatoly
#2 lore raw

12/06/2023 11:55, Burakov, Anatoly:

Quoted 6 lines · Viacheslav Ovsiienko
Quoted 5 lines

The DPDK can be compiled to be run in IOVA VA mode with 'enable_iova_as_pa=false' meson option. It disables support of the physical address field in the mbufs and application can not be run in 'IOVA as PA mode'.

Quoted 7 lines
Quoted 5 lines

The patch adds warning if some bus requires the 'IOVA as PA' mode in runtime and the 'enable_iova_as_pa=false' meson option was configured on build.

Applied, thanks.