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 D6B13A04C5 for ; 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 AC4963256; Fri, 15 Nov 2019 09:46:48 +0100 (CET) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id A66BE2C27 for ; Fri, 15 Nov 2019 09:46:45 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id t26so9427240wmi.4 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=KTfLZ0cLTmukw/4UJFNYyQrER2HrueP/YNdfpbdnuNz+ybL3CEEdmZheuZgCavEXXe xv5+fDK5MQOFIpCbDW6gD895yt6BkS6dJ9z1eESVmAnKEQNaaCnZ4bKqpIzEKA3K9H7f V0XXrOTLigZ7pdzNIgsWfQ4pJ9KWN+OPhMmxO9vTQzNutQNQlDZu1Xys9EwzmMQoDlPC 8AMzOkXJ22vlGlrKI0BH9MpoTKlw/uVUtCC3CwicAUgpC+ZrqAvmgZZXTd55C9SIwsIF P5CXc5oum6nOgKC64a6u4sJ9GFWuGGLBGGz4JoPZnYVD461KxnXjQBkfvh3+3n4jEX9T /ieg== X-Gm-Message-State: APjAAAUZBc33lsAreqEVDHLZxdCGnwSLyyYSxUynzItmBhtTKdujAeNI MgC5HWvtGhkEcVKRE9In1OiuZQ== 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-stable] [PATCH 1/2] mempool: use actual IOVA addresses when populating 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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