From patchwork Mon Nov 6 01:41:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 31181 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6902C1B256; Mon, 6 Nov 2017 02:42:13 +0100 (CET) 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 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; } }