From: Thomas Monjalon Date: Sat, 4 Nov 2017 22:09:03 +0000 (+0100) Subject: mem: hide physical address error in VA mode X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0587fb91117a44501b03b2bb16c2fc8e6eb50c85;p=dpdk.git mem: hide physical address error in VA mode If the IOVA mode is not using physical addresses, no need to log an error about physical address issue. Signed-off-by: Thomas Monjalon Acked-by: Santosh Shukla --- diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index ab287aa24c..10b42d2fe2 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -107,10 +107,11 @@ test_phys_addrs_available(void) physaddr = rte_mem_virt2phy(&tmp); if (physaddr == RTE_BAD_PHYS_ADDR) { - RTE_LOG(ERR, EAL, - "Cannot obtain physical addresses: %s. " - "Only vfio will function.\n", - strerror(errno)); + if (rte_eal_iova_mode() == RTE_IOVA_PA) + RTE_LOG(ERR, EAL, + "Cannot obtain physical addresses: %s. " + "Only vfio will function.\n", + strerror(errno)); phys_addrs_available = false; } }