From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: [PATCH 10/10] bsd/mem: get physical address of any pointer Date: Fri, 25 Apr 2014 13:59:48 +0200 Message-ID: <1398427188-14914-11-git-send-email-olivier.matz@6wind.com> References: <1398427188-14914-1-git-send-email-olivier.matz@6wind.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1398427188-14914-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 --- 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