From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 17B17A00C4;
	Thu, 28 Jul 2022 09:25:43 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 4971B427ED;
	Thu, 28 Jul 2022 09:25:40 +0200 (CEST)
Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com
 [209.85.208.176])
 by mails.dpdk.org (Postfix) with ESMTP id 53FBA40E25
 for <dev@dpdk.org>; Thu, 28 Jul 2022 09:25:39 +0200 (CEST)
Received: by mail-lj1-f176.google.com with SMTP id w16so588274ljh.3
 for <dev@dpdk.org>; Thu, 28 Jul 2022 00:25:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=MOU661I169sdGpEKmpyhpp1pyq7UnJ1c5bW0PZAc4Eg=;
 b=I83U7xo4ykV3ULqLXV/x7vyzBNScY/3wYvapepvXkxwwsDE6KRrAQUI8pkS2KP8XOJ
 h08zj0V9p8kb8f9Ca4p64K4Qb9y0LMaVF9YH/wCt8r9pYrnrk25x3d1jROM5lhgqYF51
 IRjYMi42QKoE1vAJxpPyb5SUu6xVLlLSvq7aW5LpWgT12K3zaUtWvUGEmO0/0lGfTK75
 mYwkCnsnsQz4TxKm0Xx6XU8MJkyDNGU3NrdUY7wZetWwSf3JMP6dqRiKBlVaoVUdWaeN
 xwmLMc7PNS3HC2+NZs+fdvzQWuATBdC/VxL9EdZjrIMgN4DeJ8EaJnEhsaYSAjAVcbRr
 zqFQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=MOU661I169sdGpEKmpyhpp1pyq7UnJ1c5bW0PZAc4Eg=;
 b=brgYSe6QVnkngwyyF+vYmwnbIMa11/xOSpujtDZrNjPYNyOcUK7sXlikUYla4Bl8vx
 U10wkD/UkbZCXPdpi0g6nbmNZvfFSe8yzUZD4pC7FBGzsc+KJny3t9ph+uI974ZM2tsZ
 QWY+bJIbU6kBW7uvazmEEIebGiXTyahOA3c6MGROMiyjUchwHx44jRn3CzASwCa5MEGU
 uU5ZK8YdDncUEVLcN6ywGveVgYcMN34Z5+DfeJCQSGjDBPX7RfiXkp6ZNRwxqPUX/Qte
 AF7G6nnyyC5caZ62XAE76TGNcohan0TyV/sAjM4QUheKsGm8vQrIaClm9rBvJUEiF/0x
 EG6w==
X-Gm-Message-State: AJIora/gPV2pN96D2fdoVM8QY68SHaDe54uXW6H97o/1ynM8jR58lZq4
 4yv3lOeiSKi5MxUXoR1oZ0Q=
X-Google-Smtp-Source: AGRyM1uSNRIPVo3SoxwUz12s7yUvvXOc6LaND6MD/D7zge7n5Aq7UFZ/EvX7ML2GqLFD9KgMrAWWlw==
X-Received: by 2002:a2e:b52a:0:b0:25d:f323:791c with SMTP id
 z10-20020a2eb52a000000b0025df323791cmr8360812ljm.417.1658993138611; 
 Thu, 28 Jul 2022 00:25:38 -0700 (PDT)
Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru.
 [37.110.65.23]) by smtp.gmail.com with ESMTPSA id
 o15-20020ac24e8f000000b0048a407f41bbsm55425lfr.238.2022.07.28.00.25.37
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 28 Jul 2022 00:25:38 -0700 (PDT)
Date: Thu, 28 Jul 2022 10:25:37 +0300
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Don Wallwork <donw@xsightlabs.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [RFC] EAL: legacy memory fixed address translations
Message-ID: <20220728102537.48ff6e5f@sovereign>
In-Reply-To: <e2501444-cbb7-9a41-a9f1-fda211d385fb@xsightlabs.com>
References: <256b5409-ddaf-d7cc-00c1-273ca76dbf71@xsightlabs.com>
 <6aaa04d8-2ac5-ced6-ec25-d42bc52a3e2f@xsightlabs.com>
 <20220726225910.26159820@sovereign>
 <e426c21b-0235-11a7-7039-0c55dcc15cde@xsightlabs.com>
 <20220727233644.21f0b2a3@sovereign>
 <e2501444-cbb7-9a41-a9f1-fda211d385fb@xsightlabs.com>
X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

2022-07-27 17:43 (UTC-0400), Don Wallwork:
> On 7/27/2022 4:36 PM, Dmitry Kozlyuk wrote:
> > I now understand more about_why_  you want this feature
> > but became less confident_what_  do you're proposing specifically.  
> 
> Let me try to give a trivial example of how it would work
> to make sure we're on the same page and then we can get
> back to details..

Thanks you, Don.
Now it's perfectly clear what EAL should do and we can discuss API.

[...]
> So in this example, we have a fixed offset of 9G to translate
> between VA to PA or vice versa.This works whether the huge
> pages happen to be allocated statically (legacy mode) or
> dynamically.

True!

One special case is external memory (rte_extmem_*)
which has user-controlled VA and IOVA.
If all non-external memory is mapped within one VA region,
it is possible to detect that an address is in external memory,
although it's an extra check.