From 0587fb91117a44501b03b2bb16c2fc8e6eb50c85 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Sat, 4 Nov 2017 23:09:03 +0100 Subject: [PATCH] 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 --- lib/librte_eal/linuxapp/eal/eal_memory.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; } } -- 2.20.1