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 C4212A0353; Tue, 19 Nov 2019 21:56:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5CA201C0B; Tue, 19 Nov 2019 21:56:27 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 875C6A69 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-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-49-SSP2Wk9TP3W9FFwesea23g-1; Tue, 19 Nov 2019 15:56:21 -0500 Received: by mail-ua1-f71.google.com with SMTP id j20so4949824uap.17 for ; Tue, 19 Nov 2019 12:56:21 -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=BCsVnWWFz/qgBM/AOzXtk/VfinkaXoNypOdggnlQ8mTHrh2IVGlxOthwZG+597QAiY lA96cXIvzwcakNDvuQ359GVQ/xsBEwkXkrIaAwPj3VyzIvVPjFwtBclSN0af18Gzzou4 JWwIy6RYbGu668s5USHTRYvy18l7NqIappZyyjw3BUoArHBqkQO2vVY782SR7lIQeC5h NLnP1kpxp6r9c7qvXEAHLmY5nf3FVZyaIMAeq5E6YqSktG/jHzS4ypn///Bp7haX35Av MqiJm5mohUtXgPbu1p+6BHwslrXYn+TCPuZfA8+6sgfTk+xiRxbFKo+W4g0tPaHd8oPb Uxgg== X-Gm-Message-State: APjAAAXHaNI0/qHEVelwGyn6v4ml9WciaOjg66VCo2OXkDqFiNDkVANW 2IcAp1BYOht46w66QNWoSEO/Jzr9MVis4Qwp4q8wRLGt6WED3xtChqJnyS8OOcsHWxJ+ygM7A8B WOeDY2aaYT/T3NlBHFwQ= X-Received: by 2002:a67:cfcc:: with SMTP id h12mr24635858vsm.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: SSP2Wk9TP3W9FFwesea23g-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 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