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 20B9BA04C2; Fri, 15 Nov 2019 09:46:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E079A2C27; Fri, 15 Nov 2019 09:46:46 +0100 (CET) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id A29A5B62 for ; Fri, 15 Nov 2019 09:46:45 +0100 (CET) Received: by mail-wm1-f67.google.com with SMTP id l17so8792005wmh.0 for ; Fri, 15 Nov 2019 00:46:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XjG8V5VaJHY3Sr/IL9UlGyYfj/5ZeQMuIaZrz4j8e2I=; b=X/0MiGLbraxSUzwOG9awPdFKDb9CVpH+ULM6D9s0qlH+q8O1vRv5p6HgMvb2j04ola Gpzy0sH9i/yxqQER4QhqfhBx3P8Qm4VVQT5iy/KgbQ0bf1HfUnNf3oL1uG8XrVS19/2N 5Sj10KQ5sVrdxW8tMS7NKRrkDHS025l2HhhlBiOw5uwoDURwxfFDkgLuFUCuB2wyZ57k 8H0jHDsfA5kWT76WWuNMkiC6oQTDohGYze9kMOMrVD5jfJznTRlIf45/dBlyo/Rb0oEo RaQqpx9Av3m0vMiswAH23YXLJDx15uQY74k7hpROHW5zdARhZl6KFF9arRkcU455XBfa lM+g== 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:user-agent; bh=XjG8V5VaJHY3Sr/IL9UlGyYfj/5ZeQMuIaZrz4j8e2I=; b=SUQSX+sVgswshRxhswE4cNnhOVFey09B8Gi5Lb1/BooPohpRAZXEH+2Ta/5plmTF9U XlmIMFI6zAegpDnMJYFh1dma9ip3qhSvKhII86n602HcRqHKcxREJmq642YMeFc23LII wO8ETbMmKjhPp5+op5gUTCdKRkwzJTpx2IC5HYPCOAxcW+ak9I/q8EWlDcI8BoiC+N23 RsRqRetULW45XmqGIHskv2TWz+AIJAEWRGMuE9I8dDscd/Bf7hPu3orAoaiWQG2tW4rK wX8G6kAwXVFaD+OQ68WO/XAGkM74PkVrvgp8WFZLj6y8CgPjCTzItMU3q0Y2B7BqwnQz +Eqg== X-Gm-Message-State: APjAAAXgf8LLsqaKqV6I5HXkO8e91QbOdNeCRpu+HHzZXNm7g9/hvFN4 uQ81Zyw0TYpQyR8JilcaSimBPg== X-Google-Smtp-Source: APXvYqyt72505M/oCMaxGlOziLtyYGZqspi/5x7rFuczv/DQ0sHWNzSb1axXX54zHUxdDaL6Bx+GsQ== X-Received: by 2002:a1c:411:: with SMTP id 17mr12282550wme.122.1573807605232; Fri, 15 Nov 2019 00:46:45 -0800 (PST) Received: from 6wind.com (2a01cb0c0005a6000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:5:a600:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id 65sm13052763wrs.9.2019.11.15.00.46.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2019 00:46:44 -0800 (PST) Date: Fri, 15 Nov 2019 09:46:43 +0100 From: Olivier Matz To: Anatoly Burakov Cc: dev@dpdk.org, Andrew Rybchenko , david.marchand@redhat.com, stable@dpdk.org Message-ID: <20191115084643.GF4841@platinum> References: <825d02ef7f7b6ab65a36d9fa4719847228537384.1573739893.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <825d02ef7f7b6ab65a36d9fa4719847228537384.1573739893.git.anatoly.burakov@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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 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. > Cc: stable@dpdk.org > > Signed-off-by: Anatoly Burakov Acked-by: Olivier Matz