[dpdk-dev] [PATCH 10/10] bsd/mem: get physical address of any pointer
Olivier Matz
olivier.matz at 6wind.com
Fri Apr 25 13:59:48 CEST 2014
The bsdapp part was missing in commit 57c24af85d9eaa81549a212169605b4e2468a29f.
This commit adds a dummy rte_mem_virt2phy() to fix the compilation of
DPDK under BSD. This function is only used when the debug option
"--no-huge" is given, to get the physical address of mempools in memory.
As a result, it seems acceptable for now to implement a dummy function
to fix the compilation as the usual case (using contigmem module) works
properly.
Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
---
lib/librte_eal/bsdapp/eal/eal_memory.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c
index 7d2d269..65aabf2 100644
--- a/lib/librte_eal/bsdapp/eal/eal_memory.c
+++ b/lib/librte_eal/bsdapp/eal/eal_memory.c
@@ -47,6 +47,18 @@
#define PAGE_SIZE (sysconf(_SC_PAGESIZE))
+/*
+ * Get physical address of any mapped virtual address in the current process.
+ */
+phys_addr_t
+rte_mem_virt2phy(const void *virtaddr)
+{
+ /* XXX not implemented. This function is only used by
+ * rte_mempool_virt2phy() when hugepages are disabled. */
+ (void)virtaddr;
+ return RTE_BAD_PHYS_ADDR;
+}
+
static int
rte_eal_contigmem_init(void)
{
--
1.9.2
More information about the dev
mailing list