From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=sB92W9/TvBjnhwl4Wa6mw9ZswYOwGXnRHjOr1csC4ywaCB41W0+dzY+O2KHWcNJnMg NOne9EgbHwHa/HWYhBOI0af0uTzJ8QsqrQo9vQ29AHp/g2SJiVr5WUHHUvzgSy4YP3Dw oapOAD5Uy25RlVSERgZr+tI6JKUiyih+SmIdmdxdSSKqJ+NbPtlrUJJ2ON3tglwp7AhW bnkDdxwbx7LpJLqZNDZCyPm6CQUwcrNZNcfh5Sdr3fjuSWoWL3rUnAdZuzTjXB8pj/FW RTNFBR+sRMIfTw76d/cymHlwLnPVY+Aj2uyr+K7ePiN40nbUcyVxZBKLi4KbJrLS2Wlg MjxA== X-Gm-Message-State: AKS2vOzHa315nFIPdLKfWRwN4MtM/zFDhn8owjBFp8wLAXZDjWmvlVhS RnhhskV7rv6heHfI 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-dev] [PATCH] eal: don't advertise a physical address when no hugepages 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: Mon, 12 Jun 2017 13:59:07 -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