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 854EFA0353 for ; Tue, 19 Nov 2019 21:56:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2B0C32AB; Tue, 19 Nov 2019 21:56:27 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 55AD52AB for ; Tue, 19 Nov 2019 21:56:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574196984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z1Cb64Gh8v73ENDgOUXgmqDwaDCmBnULmCnTMhQwp9w=; b=NzUj5lpWl5P3yIzOe2IDIYFQh35eJSPGUXrs5OVWIzKRNGy5qJWUyNtl7jXT4y5fq0TJ+j ccRhcFpLlUNamtNDxvNf55sv7aintxab75hpN6zPiVGvaRqm0x0U8k3UHDXO/9Ptz45yWl oLCK7su70A6qxXv9kw16ukF//VTTLTI= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-146-hopzlW0HMKScTINuQloHgg-1; Tue, 19 Nov 2019 15:56:21 -0500 Received: by mail-ua1-f69.google.com with SMTP id d8so4954973uan.4 for ; Tue, 19 Nov 2019 12:56:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z1Cb64Gh8v73ENDgOUXgmqDwaDCmBnULmCnTMhQwp9w=; b=biGlmdmzjpDLztfCVC910/+l6OjoATF9qdElmC70FeAD2ODqHQ9rDiFU+xru4wrEP7 9fXOYIHuUNxC5VAzlAe+66zsSGGrSv5QxVwh9nrGf4GGbgYsKL3LcMrUrnNFPkhERCJP 9xKJPAyG60RH+kKbZxtzxotljuZDJIxpu4iTmal1nu0pPEvBVNXIHmz7h27sPj02wvfn JWWljJTAkwz0VopsrGfJ7qeto7Uw/qoxvOlPSe1mBEOrCdXxH+LN0O/EcHm+Wz/EpdXR M9IY4x76pm1LCTwPJfkjqe9c8phBOTWHZKZx440LjC4V5JNxx6gpB5p0ruwRwPF0D7TF vbTg== X-Gm-Message-State: APjAAAUSYJLioBPEpZXNfdRg3xvitzX2tXm1F+Y6Pz8kLLvESbPla4Y+ 9y7ww+WU2rkH/hwbh7fRKZsK3xh/OZhW0dTabtceEjhsZly+a3XWwLWAweSDTakE5523uKbTb3z o4QhLSvOhZEttQkb/xTmk8lo= X-Received: by 2002:a67:cfcc:: with SMTP id h12mr24635855vsm.198.1574196980600; Tue, 19 Nov 2019 12:56:20 -0800 (PST) X-Google-Smtp-Source: APXvYqw3fRVFfZFS6FMOc/lA/B/+j+NOWscLtirg2n+ArSQiGC2fATAtrXXyyBQgRyQXW12mATrMiTZlErvBdxahZVQ= X-Received: by 2002:a67:cfcc:: with SMTP id h12mr24635832vsm.198.1574196980351; Tue, 19 Nov 2019 12:56:20 -0800 (PST) MIME-Version: 1.0 References: <825d02ef7f7b6ab65a36d9fa4719847228537384.1573739893.git.anatoly.burakov@intel.com> In-Reply-To: <825d02ef7f7b6ab65a36d9fa4719847228537384.1573739893.git.anatoly.burakov@intel.com> From: David Marchand Date: Tue, 19 Nov 2019 21:56:09 +0100 Message-ID: To: Anatoly Burakov Cc: dev , Olivier Matz , Andrew Rybchenko , dpdk stable , box.c.chen@intel.com, WenjieX A Li X-MC-Unique: hopzlW0HMKScTINuQloHgg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 2:58 PM 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") > Cc: stable@dpdk.org > > Signed-off-by: Anatoly Burakov Acked-by: Olivier Matz Tested-by: Bo Chen Series applied, thanks. -- David Marchand