From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 260AFA04C5; Fri, 15 Nov 2019 11:13:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 29EE89E4; Fri, 15 Nov 2019 11:13:02 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D86A2374; Fri, 15 Nov 2019 11:12:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Nov 2019 02:12:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,308,1569308400"; d="scan'208";a="406634274" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.92]) ([10.237.220.92]) by fmsmga006.fm.intel.com with ESMTP; 15 Nov 2019 02:12:56 -0800 To: Olivier Matz Cc: dev@dpdk.org, Andrew Rybchenko , david.marchand@redhat.com, stable@dpdk.org References: <825d02ef7f7b6ab65a36d9fa4719847228537384.1573739893.git.anatoly.burakov@intel.com> <20191115084643.GF4841@platinum> From: "Burakov, Anatoly" Message-ID: <3142a062-8fa9-905c-084f-d80f995d3753@intel.com> Date: Fri, 15 Nov 2019 10:12:55 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191115084643.GF4841@platinum> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/2] mempool: use actual IOVA addresses when populating 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 15-Nov-19 8:46 AM, Olivier Matz wrote: > On Thu, Nov 14, 2019 at 01:58:20PM +0000, Anatoly Burakov wrote: >> Currently, when mempool is being populated, we get IOVA address >> of every segment using rte_mem_virt2iova(). This works for internal >> memory, but does not really work for external memory, and does not >> work on platforms which return RTE_BAD_IOVA as a result of this >> call (such as FreeBSD). Moreover, even when it works, the function >> in question will do unnecessary pagewalks in IOVA as PA mode, as >> it falls back to rte_mem_virt2phy() instead of just doing a lookup in >> internal memseg table. >> >> To fix it, replace the call to first attempt to look through the >> internal memseg table (this takes care of internal and external memory), >> and fall back to rte_mem_virt2iova() when unable to perform VA->IOVA >> translation via memseg table. >> >> Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") > > Shouldn't we also add > Fixes: 035ee5bea5ef ("mempool: remove optimistic IOVA-contiguous allocation") > ? > >>>From what I understand, even if the problem existed in populate_virt() > before, this is the commit that makes the problem visible in most cases. The commit didn't introduce the issue - only revealed it. So the commit itself isn't buggy, and there's nothing to fix :) However, i'm not opposed to sharing the blame! > >> Cc: stable@dpdk.org >> >> Signed-off-by: Anatoly Burakov > > Acked-by: Olivier Matz > -- Thanks, Anatoly