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 6F2FEA04AE; Wed, 6 Nov 2019 22:11:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1D53D1E946; Wed, 6 Nov 2019 22:11:54 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 222B71E945 for ; Wed, 6 Nov 2019 22:11:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573074712; 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=Dg81VSpJ+LLHJOyWepygRl8gzZEwMHobCMlllkhKBcc=; b=Sv6uDd7DBINjG2JCoWvkn9e/vvzsJjjQe6RMbJwmc3bIsusjeOymVgWFZHR9jkgFkei91H Yoo96epxrxlRbd1zX0PG7l/43VLmMBIO6Cm/zEY32SYejvsy+jLbdVzcHSB66dEA7dT3jh eG7b3jvBSkXq3psa+EAuzW/qbuMaGeo= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-36-P0RAd4_MMKyDrQdbwu1YsA-1; Wed, 06 Nov 2019 16:11:51 -0500 Received: by mail-vk1-f199.google.com with SMTP id a188so53797vkc.7 for ; Wed, 06 Nov 2019 13:11:51 -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:content-transfer-encoding; bh=Dg81VSpJ+LLHJOyWepygRl8gzZEwMHobCMlllkhKBcc=; b=pHaZrYA6CsmC4NzVAwNFmFU31SEk63ch2FMYf7KsMZjq91QHBQCWlpDbFAWUmu+iRC L6EFbyFMv9JHMDQTHz4pe50m6Gt+p6llgIz2Emxm6KiOik3GS+ybJP0d4d6DOZ26S6vJ Bp4ARFacdU3BexK9RNAg+H5ODz2TS5POVxFOhzNSShm/fIRxQO6raK1GEl5qJDzZmVC4 zBOhdSppA7AxEJFNeypeA9lo1Ndj9dNx63W/na0dIEgYnOvWIJ5zG6jJ5QSalYkqAJm+ RnK1tJGNDkyKmSiiY3hVvnu7HWRoFK5walnAaNVU7Kxz2DvZCN0FgbIOOqSkIV2lyCpX pbmA== X-Gm-Message-State: APjAAAUFwqJa/5GbauROZ431s3FlpIdTyN/1VtUeCmuL2DUbwoeB/C5T rECj8MNsW8YyFzrw+UeHtFEsySAXx6kke7xRIwBYM00rtT45PPO7/SNzmNAnrJiuLyN/fHHBF3S A8ktDgJ6tUoNQTe1ikL8= X-Received: by 2002:a67:7d95:: with SMTP id y143mr2798494vsc.39.1573074710705; Wed, 06 Nov 2019 13:11:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxs1TAW8wCLwgNIwkLONAz0XL8tKcFfRNBdJ3QEz2pxRNR+EStgMcIR69qlpKTYHH1uRAGYhRW2OkhKYkrf3kg= X-Received: by 2002:a67:7d95:: with SMTP id y143mr2798459vsc.39.1573074710203; Wed, 06 Nov 2019 13:11:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: David Marchand Date: Wed, 6 Nov 2019 22:11:38 +0100 Message-ID: To: Anatoly Burakov Cc: dev , Neil Horman , John McNamara , Marko Kovacevic , Bruce Richardson , Thomas Monjalon X-MC-Unique: P0RAd4_MMKyDrQdbwu1YsA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] vfio: remove deprecated DMA mapping functions 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, Oct 24, 2019 at 2:18 PM Anatoly Burakov wrote: > > The rte_vfio_dma_map/unmap API's have been marked as deprecated in > release 19.05. Remove them. > > Signed-off-by: Anatoly Burakov > --- > > Notes: > Although `rte_vfio_dma_map` et al. was marked as deprecated in our do= cumentation, > it wasn't marked as __rte_deprecated in code. Should we still remove = it? > > doc/guides/rel_notes/deprecation.rst | 4 --- > doc/guides/rel_notes/release_19_11.rst | 3 ++ > lib/librte_eal/common/include/rte_vfio.h | 44 ------------------------ > lib/librte_eal/freebsd/eal/eal.c | 14 -------- > lib/librte_eal/linux/eal/eal_vfio.c | 36 ------------------- > lib/librte_eal/rte_eal_version.map | 2 -- > 6 files changed, 3 insertions(+), 100 deletions(-) > > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/= deprecation.rst > index 237813b647..f044a0e436 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -44,10 +44,6 @@ Deprecation Notices > * eal: The ``rte_malloc_virt2phy`` function has been deprecated and repl= aced > by ``rte_malloc_virt2iova`` since v17.11 and will be removed. > > -* vfio: removal of ``rte_vfio_dma_map`` and ``rte_vfio_dma_unmap`` APIs = which > - have been replaced with ``rte_dev_dma_map`` and ``rte_dev_dma_unmap`` > - functions. The due date for the removal targets DPDK 20.02. > - > * pci: Several exposed functions are misnamed. > The following functions are deprecated starting from v17.11 and are re= placed: > > diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_note= s/release_19_11.rst > index 856088c5c7..c43d6b29ef 100644 > --- a/doc/guides/rel_notes/release_19_11.rst > +++ b/doc/guides/rel_notes/release_19_11.rst > @@ -137,6 +137,9 @@ Removed Items > Also, make sure to start the actual text at the margin. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > > + * Removed `rte_vfio_dma_map` and `rte_vfio_dma_unmap` API's that have= been > + marked as deprecated in release 19.05. > + This should be in the API change section. Plus the indentation is incorrect. Will fix when applying. > * Removed duplicated set of commands for RX offloading configuration = from app/testpmd: > =E2=80=9Cport config all crc-strip|scatter|rx-cksum|rx-timestamp|hw= -vlan|hw-vlan-filter| > hw-vlan-strip|hw-vlan-extend on|off=E2=80=9D. > diff --git a/lib/librte_eal/common/include/rte_vfio.h b/lib/librte_eal/co= mmon/include/rte_vfio.h > index b360485fad..20ed8c45a9 100644 > --- a/lib/librte_eal/common/include/rte_vfio.h > +++ b/lib/librte_eal/common/include/rte_vfio.h > @@ -189,50 +189,6 @@ int rte_vfio_noiommu_is_enabled(void); > int > rte_vfio_clear_group(int vfio_group_fd); > > -/** > - * Map memory region for use with VFIO. > - * > - * @note Require at least one device to be attached at the time of > - * mapping. DMA maps done via this API will only apply to default > - * container and will not apply to any of the containers created > - * via rte_vfio_container_create(). > - * > - * @param vaddr > - * Starting virtual address of memory to be mapped. > - * > - * @param iova > - * Starting IOVA address of memory to be mapped. > - * > - * @param len > - * Length of memory segment being mapped. > - * > - * @return > - * 0 if success. > - * -1 on error. > - */ > -int > -rte_vfio_dma_map(uint64_t vaddr, uint64_t iova, uint64_t len); > - > - > -/** > - * Unmap memory region from VFIO. > - * > - * @param vaddr > - * Starting virtual address of memory to be unmapped. > - * > - * @param iova > - * Starting IOVA address of memory to be unmapped. > - * > - * @param len > - * Length of memory segment being unmapped. > - * > - * @return > - * 0 if success. > - * -1 on error. > - */ > - > -int > -rte_vfio_dma_unmap(uint64_t vaddr, uint64_t iova, uint64_t len); > /** > * Parse IOMMU group number for a device > * > diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/ea= l/eal.c > index f86e9aa318..3a62e2faf7 100644 > --- a/lib/librte_eal/freebsd/eal/eal.c > +++ b/lib/librte_eal/freebsd/eal/eal.c > @@ -1007,20 +1007,6 @@ int rte_vfio_clear_group(__rte_unused int vfio_gro= up_fd) > return 0; > } > > -int > -rte_vfio_dma_map(uint64_t __rte_unused vaddr, __rte_unused uint64_t iova= , > - __rte_unused uint64_t len) > -{ > - return -1; > -} > - > -int > -rte_vfio_dma_unmap(uint64_t __rte_unused vaddr, uint64_t __rte_unused io= va, > - __rte_unused uint64_t len) > -{ > - return -1; > -} > - > int > rte_vfio_get_group_num(__rte_unused const char *sysfs_base, > __rte_unused const char *dev_addr, > diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/e= al/eal_vfio.c > index d9541b1220..0af1fafa68 100644 > --- a/lib/librte_eal/linux/eal/eal_vfio.c > +++ b/lib/librte_eal/linux/eal/eal_vfio.c > @@ -1829,28 +1829,6 @@ container_dma_unmap(struct vfio_config *vfio_cfg, = uint64_t vaddr, uint64_t iova, > return ret; > } > > -int > -rte_vfio_dma_map(uint64_t vaddr, uint64_t iova, uint64_t len) > -{ > - if (len =3D=3D 0) { > - rte_errno =3D EINVAL; > - return -1; > - } > - > - return container_dma_map(default_vfio_cfg, vaddr, iova, len); > -} > - > -int > -rte_vfio_dma_unmap(uint64_t vaddr, uint64_t iova, uint64_t len) > -{ > - if (len =3D=3D 0) { > - rte_errno =3D EINVAL; > - return -1; > - } > - > - return container_dma_unmap(default_vfio_cfg, vaddr, iova, len); > -} > - > int > rte_vfio_noiommu_is_enabled(void) > { > @@ -2028,20 +2006,6 @@ rte_vfio_container_dma_unmap(int container_fd, uin= t64_t vaddr, uint64_t iova, > > #else > > -int > -rte_vfio_dma_map(uint64_t __rte_unused vaddr, __rte_unused uint64_t iova= , > - __rte_unused uint64_t len) > -{ > - return -1; > -} > - > -int > -rte_vfio_dma_unmap(uint64_t __rte_unused vaddr, uint64_t __rte_unused io= va, > - __rte_unused uint64_t len) > -{ > - return -1; > -} > - > int > rte_vfio_setup_device(__rte_unused const char *sysfs_base, > __rte_unused const char *dev_addr, > diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_= version.map > index 7cbf82d37b..33601e8e67 100644 > --- a/lib/librte_eal/rte_eal_version.map > +++ b/lib/librte_eal/rte_eal_version.map > @@ -248,8 +248,6 @@ DPDK_18.08 { > rte_vfio_container_dma_unmap; > rte_vfio_container_group_bind; > rte_vfio_container_group_unbind; > - rte_vfio_dma_map; > - rte_vfio_dma_unmap; > rte_vfio_get_container_fd; > rte_vfio_get_group_fd; > rte_vfio_get_group_num; > -- > 2.17.1 Acked-by: David Marchand --=20 David Marchand