From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH] eal: don't advertise a physical address when no hugepages Date: Mon, 12 Jun 2017 15:58:57 +0200 Message-ID: <20170612135857.GB1758@6wind.com> References: <20170609102727.0eb7f39d@platinum> <20170609082937.21294-1-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, matvejchikov@gmail.com, jblunck@infradead.org, sergio.gonzalez.monroy@intel.com, stable@dpdk.org To: Olivier Matz Return-path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 848382A58 for ; Mon, 12 Jun 2017 15:59:07 +0200 (CEST) Received: by mail-wr0-f177.google.com with SMTP id v111so98284179wrc.3 for ; Mon, 12 Jun 2017 06:59:07 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20170609082937.21294-1-olivier.matz@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jun 09, 2017 at 10:29:37AM +0200, Olivier Matz wrote: > When populating a mempool with a virtual memory area, the mempool > library expects to be able to get the physical address of each page. > > When started with --no-huge, the physical addresses may not be available > because the pages are not locked in memory. It sometimes returns > RTE_BAD_PHYS_ADDR, which makes the mempool_populate() function to fail. > > This was working before the commit cdc242f260e7 ("eal/linux: support > running as unprivileged user"), because rte_mem_virt2phy() was returning > 0 instead of RTE_BAD_PHYS_ADDR, which was seen as a valid physical > address. > > Since --no-huge is a debug function that breaks the support of physical > drivers, always set physical addresses to RTE_BAD_PHYS_ADDR in memzones > or in rte_mem_virt2phy(), and ensure that mempool won't complain in that > case. > > Fixes: cdc242f260e7 ("eal/linux: support running as unprivileged user") > > CC: stable@dpdk.org > Signed-off-by: Olivier Matz Tested-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND