From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 75FAE1B468; Thu, 14 Feb 2019 18:57:49 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9A25D806B6; Thu, 14 Feb 2019 17:57:48 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38F4410027CE; Thu, 14 Feb 2019 17:57:40 +0000 (UTC) From: Kevin Traynor To: anatoly.burakov@intel.com, dev@dpdk.org Cc: Kevin Traynor , stable@dpdk.org Date: Thu, 14 Feb 2019 17:56:56 +0000 Message-Id: <20190214175656.14390-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 14 Feb 2019 17:57:48 +0000 (UTC) Subject: [dpdk-dev] [PATCH] eal/linux: fix log levels for unable to read pagemap 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: Thu, 14 Feb 2019 17:57:49 -0000 Commit cdc242f260e7 says: For Linux kernel 4.0 and newer, the ability to obtain physical page frame numbers for unprivileged users from /proc/self/pagemap was removed. Instead, when an IOMMU is present, simply choose our own DMA addresses instead. In this case the user still sees error messages, so adjust the log levels. Later, other checks will ensure that errors are logged in the appropriate cases. Fixes: cdc242f260e7 ("eal/linux: support running as unprivileged user") Cc: stable@dpdk.org Signed-off-by: Kevin Traynor --- lib/librte_eal/linuxapp/eal/eal_memory.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 1b96b576e..f6ee403ad 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -115,5 +115,5 @@ rte_mem_virt2phy(const void *virtaddr) fd = open("/proc/self/pagemap", O_RDONLY); if (fd < 0) { - RTE_LOG(ERR, EAL, "%s(): cannot open /proc/self/pagemap: %s\n", + RTE_LOG(INFO, EAL, "%s(): cannot open /proc/self/pagemap: %s\n", __func__, strerror(errno)); return RTE_BAD_IOVA; @@ -123,5 +123,5 @@ rte_mem_virt2phy(const void *virtaddr) offset = sizeof(uint64_t) * virt_pfn; if (lseek(fd, offset, SEEK_SET) == (off_t) -1) { - RTE_LOG(ERR, EAL, "%s(): seek error in /proc/self/pagemap: %s\n", + RTE_LOG(INFO, EAL, "%s(): seek error in /proc/self/pagemap: %s\n", __func__, strerror(errno)); close(fd); @@ -132,9 +132,9 @@ rte_mem_virt2phy(const void *virtaddr) close(fd); if (retval < 0) { - RTE_LOG(ERR, EAL, "%s(): cannot read /proc/self/pagemap: %s\n", + RTE_LOG(INFO, EAL, "%s(): cannot read /proc/self/pagemap: %s\n", __func__, strerror(errno)); return RTE_BAD_IOVA; } else if (retval != PFN_MASK_SIZE) { - RTE_LOG(ERR, EAL, "%s(): read %d bytes from /proc/self/pagemap " + RTE_LOG(INFO, EAL, "%s(): read %d bytes from /proc/self/pagemap " "but expected %d:\n", __func__, retval, PFN_MASK_SIZE); -- 2.20.1