[PATCH 1/2] eal/freebsd: fix memseg addresses in EAL VA mode
Bruce Richardson
bruce.richardson at intel.com
Mon May 25 19:13:39 CEST 2026
In BSD, when mapping the contigmem segments, the iova is unconditionally
set to the physical address, irrespective of the actual IOVA mode.
Change this to use virtual addresses when iova mode is IOVA_AS_VA.
Fixes: 764bf26873b9 ("add FreeBSD support")
Cc: stable at dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
lib/eal/freebsd/eal_memory.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/eal_memory.c
index cd608db9f9..e56d149a22 100644
--- a/lib/eal/freebsd/eal_memory.c
+++ b/lib/eal/freebsd/eal_memory.c
@@ -214,7 +214,10 @@ rte_eal_hugepage_init(void)
}
seg->addr = addr;
- seg->iova = physaddr;
+ if (rte_eal_iova_mode() == RTE_IOVA_VA)
+ seg->iova = (uintptr_t)addr;
+ else
+ seg->iova = physaddr;
seg->hugepage_sz = page_sz;
seg->len = page_sz;
seg->nchannel = mcfg->nchannel;
--
2.53.0
More information about the stable
mailing list