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 5CBACA0561; Mon, 20 Apr 2020 14:16:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 39B971C2DA; Mon, 20 Apr 2020 14:16:57 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id AE0931C1DE for ; Mon, 20 Apr 2020 14:16:55 +0200 (CEST) IronPort-SDR: 2Fi/EX8TLLg9cq7q/d/ojclqEPHBpEmTxgM/hDhGugtrjlVFpBNpa+hHWaYATcr7Qla3ll123L xiQ1Bs9A+W4g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2020 05:16:54 -0700 IronPort-SDR: IvzXbPNuEACx/GtqwrUhP35rCeSmgKGE0+IZt0K4JEeupfjH5++OUkXJmCxexM5+5eRW2xZFW+ WYHCHu5jvsVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,406,1580803200"; d="scan'208";a="246879406" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.193.28]) ([10.213.193.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Apr 2020 05:16:53 -0700 To: Li Feng , Bruce Richardson Cc: lifeng1519@gmail.com, dev@dpdk.org References: <20200420110953.959884-1-fengli@smartx.com> From: "Burakov, Anatoly" Message-ID: Date: Mon, 20 Apr 2020 13:16:53 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200420110953.959884-1-fengli@smartx.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] librte_eal: add APIs to speedup virt2iova/phys 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 20-Apr-20 12:09 PM, Li Feng wrote: > Using pread to replace lseek + read. > And add new APIs to reduce open/close/lseek system call frequency when the > user needs to convert a large range of virtual address space. > - rte_mem_virt2iova_with_fd > - rte_mem_virt2phy_with_fd > > Currently it will be used by spdk in spdk_mem_register. > > Signed-off-by: Li Feng > --- These API's are IMO already on the verge of what's acceptable because of the differences between PA, DPDK IOVA and external memory IOVA. I'm not sure building on top of them is a good idea. It's also quite platform specific - rte_mem_virt2phy could potentially work with Windows (and in fact there was an RFC for it), but would this API work with Windows, given that Windows doesn't have fd's? Should we perhaps replace fd's with an opaque structure pointer, so that each platform-specific implementation could dereference it the way it needs to, without exposing internal details of the platform? -- Thanks, Anatoly