From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) by dpdk.org (Postfix) with ESMTP id 34FD92A58 for ; Mon, 12 Jun 2017 15:59:07 +0200 (CEST) Received: by mail-wr0-f174.google.com with SMTP id v104so97319310wrb.0 for ; Mon, 12 Jun 2017 06:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0LmEfgxN9uTemaLhqm4D4DNGuNPkamvNY/kU5b0Fy3g=; b=Zbzr4acITOXaIJGttA3YbczDy9RIBfwvv7YaqSVxSL8YQsbJjyaPY6atTebhMCb6Rh cqLMurGlwayCY0J8D5eYTpTYhZcBu6oAiYG98Fwov7lwt7qVfhwc1ApqWUm26nuHK6Z1 6bzc79DkQUmft8SJ9A8kaW1sV+ouwSP3a+TZ+Sso1pdG8o4Luz7xAfZUkdBpAVQwzZvT p63uRTcyMb6daVge96a2iViDg3v1fgqgogbLpgI/+Ej93+2t/hhqM1t2ubPjfdCSS4AU fxA3dE+Nhfb6Y3h96K6vie5hO5RGEEzKEP+NyEgYbD6+Fe92byTbMx3Zpb6HB5JK7ZJi G9eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0LmEfgxN9uTemaLhqm4D4DNGuNPkamvNY/kU5b0Fy3g=; b=s6Jwh69QqjLMCf80VDIOKQ6V53q0iQKbiOKem29y/p4tYkYrYDe8TUn+HClmg/jkD4 Fy9Z/Ia9GOEfWlWUV0gcY3C3MAA/QohooLtunlHXxlwsBtxckjzdYN0XSgZ1OHeAuMbQ lilXuUbYfEpIBXNeb8U/VVkNDv++cDBFPeh24ZbUarDLWnfPcBi67kwlKLONwQR+UnAl 5iXfROzAsqFymf5shs5/kuo2Lnw/DTDh/lHRjGHV1KuKds9Cc8S9jnrRxY3fimRdD7xR BPGgKATY7dfF/i/Hw1p+Q9KhtSdZh99umY5q2M6HilGhCwBY+YH8JMAl3C9mnbWkRk82 yXng== X-Gm-Message-State: AKS2vOwYlHBZktOVnSNdnsdqqldDG+GDfTBapY2Je8mLDEMEm50mJEdd WxUjLW94TMPEz4AV X-Received: by 10.28.220.212 with SMTP id t203mr8081306wmg.6.1497275946806; Mon, 12 Jun 2017 06:59:06 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id j126sm209070wmd.29.2017.06.12.06.59.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 06:59:05 -0700 (PDT) Date: Mon, 12 Jun 2017 15:58:57 +0200 From: Adrien Mazarguil To: Olivier Matz Cc: dev@dpdk.org, matvejchikov@gmail.com, jblunck@infradead.org, sergio.gonzalez.monroy@intel.com, stable@dpdk.org 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 Content-Disposition: inline In-Reply-To: <20170609082937.21294-1-olivier.matz@6wind.com> Subject: Re: [dpdk-stable] [PATCH] eal: don't advertise a physical address when no hugepages X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2017 13:59:08 -0000 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