From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 7B7421B238 for ; Mon, 6 Nov 2017 02:42:11 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3043020C0D; Sun, 5 Nov 2017 20:42:11 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 05 Nov 2017 20:42:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=eDmFQDWiurNG4K I9euZA0Ty7P27TAgITWeqdXxfarqM=; b=JAR9eZoM7Lzb6im1J8aHAYnpZoSQ6p itFrsFw2ptcWsIYTVOGVN3FBESEONpZ5pvbtyTlyIYyZ+DooWB8FbDA5URnK7OGL DjdHSaRS7+C/4f6Tjgtx8ja6b7s/5nHBkvTbr8EXKtpsGmhANAmX3MDROSgiDpdb 3VPeO2fRcSepg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=eDmFQDWiurNG4KI9euZA0Ty7P27TAgITWeqdXxfarqM=; b=DYtgq2G/ JB6qmcU5FjlopIHyvDmdbHw5g0NxKoYtupIArZz/LLLEiwEeRGuysFFCN27kaO8G ul35Ji2ANCVULIYlBMLlLOBy1b1tGxUJejk57SXHaDjyK+z0BF7e+xf0TqF/cwwA 6/tr5prS1TDidLG3UxVXtRBqyaaDjtQIIf7kW/3aWclsZSiV1prYeevdDMt+LtUL iyP0EShYDX0ayF3jXfbpSjIreixr0HhEKENDdaMyarizHbDMquWg2OCnqe+kV8Ye R5zRWS/AfWC9YYNn/naeYmZORVjDnsLatSxq0lxikJWPs4jX3Zpe5mOuXqeU2ltR BdjLb0wTY/54QQ== X-ME-Sender: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 67D392469F; Sun, 5 Nov 2017 20:42:10 -0500 (EST) From: Thomas Monjalon To: Santosh Shukla Cc: olivier.matz@6wind.com, sergio.gonzalez.monroy@intel.com, anatoly.burakov@intel.com, dev@dpdk.org Date: Mon, 6 Nov 2017 02:41:27 +0100 Message-Id: <20171106014141.13266-2-thomas@monjalon.net> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171106014141.13266-1-thomas@monjalon.net> References: <20170814151537.29454-1-santosh.shukla@caviumnetworks.com> <20171106014141.13266-1-thomas@monjalon.net> Subject: [dpdk-dev] [PATCH v4 01/15] mem: hide physical address error in VA mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2017 01:42:11 -0000 If the IOVA mode is not using physical addresses, no need to log an error about physical address issue. Signed-off-by: Thomas Monjalon --- 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 ab287aa24..10b42d2fe 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.14.2