From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [dpdk-stable] [PATCH v2] eal: don't advertise a physical address when no hugepages Date: Tue, 04 Jul 2017 17:53:54 +0200 Message-ID: <1867099.27613Eycdk@xps> References: <20170609082937.21294-1-olivier.matz@6wind.com> <20170703100407.21790-1-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: stable@dpdk.org, Jan Blunck , dev@dpdk.org, Ilya Matveychikov , Adrien Mazarguil , sergio.gonzalez.monroy@intel.com, santosh.shukla@caviumnetworks.com To: Olivier Matz Return-path: In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 03/07/2017 12:17, Jan Blunck: > On Mon, Jul 3, 2017 at 12:04 PM, 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 > > Reviewed-by: Jan Blunck Applied, thanks