From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: Neil Horman <nhorman@tuxdriver.com>,
John McNamara <john.mcnamara@intel.com>,
Marko Kovacevic <marko.kovacevic@intel.com>,
Bruce Richardson <bruce.richardson@intel.com>,
thomas@monjalon.net
Subject: [dpdk-dev] [PATCH] vfio: remove deprecated DMA mapping functions
Date: Thu, 24 Oct 2019 13:18:24 +0100 [thread overview]
Message-ID: <d75ca1b5a948fbaf548162a075ba2836f4990792.1571919488.git.anatoly.burakov@intel.com> (raw)
The rte_vfio_dma_map/unmap API's have been marked as deprecated in
release 19.05. Remove them.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
Although `rte_vfio_dma_map` et al. was marked as deprecated in our documentation,
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 replaced
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 replaced:
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/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.
=========================================================
+ * Removed `rte_vfio_dma_map` and `rte_vfio_dma_unmap` API's that have been
+ marked as deprecated in release 19.05.
+
* Removed duplicated set of commands for RX offloading configuration from app/testpmd:
“port config all crc-strip|scatter|rx-cksum|rx-timestamp|hw-vlan|hw-vlan-filter|
hw-vlan-strip|hw-vlan-extend on|off”.
diff --git a/lib/librte_eal/common/include/rte_vfio.h b/lib/librte_eal/common/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/eal/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_group_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 iova,
- __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/eal/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 == 0) {
- rte_errno = 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 == 0) {
- rte_errno = 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, uint64_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 iova,
- __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
next reply other threads:[~2019-10-24 12:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 12:18 Anatoly Burakov [this message]
2019-10-24 19:09 ` David Marchand
2019-10-24 20:27 ` Stephen Hemminger
2019-10-24 22:32 ` Thomas Monjalon
2019-10-25 11:13 ` Damjan Marion (damarion)
2019-10-25 12:23 ` Burakov, Anatoly
2019-10-25 13:02 ` Damjan Marion (damarion)
2019-11-04 13:57 ` Damjan Marion (damarion)
2019-11-04 17:27 ` Burakov, Anatoly
2019-11-04 17:34 ` Damjan Marion (damarion)
2019-11-04 17:42 ` Burakov, Anatoly
2019-11-04 17:44 ` Damjan Marion (damarion)
2019-11-06 13:48 ` David Marchand
2019-11-06 13:50 ` Thomas Monjalon
2019-11-06 13:54 ` Burakov, Anatoly
2019-10-27 7:00 ` Shahaf Shuler
2019-11-04 13:58 ` Damjan Marion (damarion)
2019-11-06 21:11 ` David Marchand
2019-11-07 15:34 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d75ca1b5a948fbaf548162a075ba2836f4990792.1571919488.git.anatoly.burakov@intel.com \
--to=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=john.mcnamara@intel.com \
--cc=marko.kovacevic@intel.com \
--cc=nhorman@tuxdriver.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).