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 27089A0561; Mon, 20 Apr 2020 16:13:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 042281C2F9; Mon, 20 Apr 2020 16:13:16 +0200 (CEST) Received: from mail-vs1-f67.google.com (mail-vs1-f67.google.com [209.85.217.67]) by dpdk.org (Postfix) with ESMTP id 02E301C2F7 for ; Mon, 20 Apr 2020 16:13:13 +0200 (CEST) Received: by mail-vs1-f67.google.com with SMTP id p28so6037771vsg.13 for ; Mon, 20 Apr 2020 07:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Cvle9LmskXrL3325bEJM/qvEicEuZPc6PScDUlQ5tUc=; b=aibKssCt4lxuQTQ94TgoWGVg7D1+P2LXRQpm9OrgbkhfNx09kWy6M53OelVDKG8f9x Ha8j4yWOVBLNeIBCDrpVoQqmTBJK8S0H9yG7ipSXZuEwHvzPQlM82Kl0ZAoEJJhwJOsW 16s5Ej/z23Paw/Dvc9YQKCZr6iRF799qJGRVQIQSSPDvTzY7Ab6AXCLlh0UxEnwq7kXU 6vCXcfyvK77gj/4lajKB+Uf/KynSCjEmnb/d+GBCej4/04gBz8pGpJQP/QxH6VZQy3C2 camuITE+5YFDbltlfHVRAkY1SDtTh1Ccw3TDvZB6CVexFhmENZ9SljhAlR1mPbXn5dSC laLA== 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:content-transfer-encoding; bh=Cvle9LmskXrL3325bEJM/qvEicEuZPc6PScDUlQ5tUc=; b=NhIvmpysTmmDfjXK6r6AskRk4a/nXOgEV3TCCJlPGzQQ6ApBSBwRgvVNd1+8zsIzFA nV2//OEs/9WpF5q2re2My5hV64rR0w1d5c19kY8PYbJ6GrwUpxHyBy47uHngaXX8z99l LV/tE9Y8U272C/ubPvb8f+tqONBLQve5wNAh4MLqS+Nh6aFKLU2tsitDO/S1os2caUwZ kVA4gRzSsDEJIOdLr0YH8YKkm+uJCFtINCmi+Dh4KGsdPkJwuvcTQTFHQ8pLItXOqO7o +Eu4ObLo8/PekRXRws1HYfDb4UxC9oSlQzn9y7W2Lh+WDVropv0rG2RVHN0K2Y2tQhoT IjlQ== X-Gm-Message-State: AGi0PuYCReEWtUUfA4OeidLMNLymoK9pLZvCAsij9O+DJ/0hoK0ubSe7 0YlziEPVdoEQze8opvi/G4kkzyk/qXgl9h88A7izm6LUy5MEni629dHoQAlj/+8gakqCWlYL/qW CiCj13bYlIWTt X-Google-Smtp-Source: APiQypK/h5EZ4WUd4w8Sv17Bv4Bstsph++6aOGKoN15/mv7aFmJIIG7wRwod8n6IdXK5moV4+L6+jkaJGRySFJaaDag= X-Received: by 2002:a67:6b41:: with SMTP id g62mr3960065vsc.168.1587391993121; Mon, 20 Apr 2020 07:13:13 -0700 (PDT) MIME-Version: 1.0 References: <20200420110953.959884-1-fengli@smartx.com> <20200420160705.1652aeae@Sovereign> In-Reply-To: <20200420160705.1652aeae@Sovereign> From: Li Feng Date: Mon, 20 Apr 2020 22:13:01 +0800 Message-ID: To: Dmitry Kozlyuk Cc: "Burakov, Anatoly" , Bruce Richardson , lifeng1519@gmail.com, dev@dpdk.org, Kyle Zhang , Yang Fan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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" Cool, thank you, Anatoly and Kozlyuk. I haven't found how Windows implements the rte_mem_virt2phy. Using an opaque structure pointer as the first argument is a good idea. Thanks, Feng Li Dmitry Kozlyuk =E4=BA=8E2020=E5=B9=B44=E6=9C=882= 0=E6=97=A5=E5=91=A8=E4=B8=80 =E4=B8=8B=E5=8D=889:07=E5=86=99=E9=81=93=EF=BC= =9A > > > 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 whe= n 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 o= f > > 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? > > These new APIs are, in fact, Linux-specific. Doubtfully will Windows ever > benefit from it even with fd abstracted, though I can't say for FreeBSD. = Given > the linked suggestion to move rte_vfio_container_dma_map/unmap to some > include/linux header, maybe these APIs could land there too? > > http://mails.dpdk.org/archives/dev/2020-April/164404.html > > -- > Dmitry Kozlyuk --=20 The SmartX email address is only for business purpose. Any sent message=20 that is not related to the business is not authorized or permitted by=20 SmartX. =E6=9C=AC=E9=82=AE=E7=AE=B1=E4=B8=BA=E5=8C=97=E4=BA=AC=E5=BF=97=E5=87=8C=E6= =B5=B7=E7=BA=B3=E7=A7=91=E6=8A=80=E6=9C=89=E9=99=90=E5=85=AC=E5=8F=B8=EF=BC= =88SmartX=EF=BC=89=E5=B7=A5=E4=BD=9C=E9=82=AE=E7=AE=B1. =E5=A6=82=E6=9C=AC= =E9=82=AE=E7=AE=B1=E5=8F=91=E5=87=BA=E7=9A=84=E9=82=AE=E4=BB=B6=E4=B8=8E=E5= =B7=A5=E4=BD=9C=E6=97=A0=E5=85=B3,=E8=AF=A5=E9=82=AE=E4=BB=B6=E6=9C=AA=E5= =BE=97=E5=88=B0=E6=9C=AC=E5=85=AC=E5=8F=B8=E4=BB=BB=E4=BD=95=E7=9A=84=E6=98= =8E=E7=A4=BA=E6=88=96=E9=BB=98=E7=A4=BA=E7=9A=84=E6=8E=88=E6=9D=83.