summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJan Viktorin <viktorin@rehivetech.com>2016-07-04 17:16:48 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-07-11 13:37:12 +0200
commit5d258d732db9e77d523f9dd32da6e6927d5ca62f (patch)
tree6f949dd4b1005724784ed4da4b769cbe930970b5 /lib
parent73983b2bdae8a285c3cca3bbd18a7e965c3f1cca (diff)
downloaddpdk-5d258d732db9e77d523f9dd32da6e6927d5ca62f.zip
dpdk-5d258d732db9e77d523f9dd32da6e6927d5ca62f.tar.gz
dpdk-5d258d732db9e77d523f9dd32da6e6927d5ca62f.tar.xz
vfio: make mode types private
There is no more reason to expose those definitions as nobody uses them. Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/librte_eal/linuxapp/eal/eal_vfio.c15
-rw-r--r--lib/librte_eal/linuxapp/eal/eal_vfio.h10
2 files changed, 13 insertions, 12 deletions
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index d11f723..fcb0ab3 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -49,6 +49,17 @@
/* per-process VFIO config */
static struct vfio_config vfio_cfg;
+static int vfio_type1_dma_map(int);
+static int vfio_noiommu_dma_map(int);
+
+/* IOMMU types we support */
+static const struct vfio_iommu_type iommu_types[] = {
+ /* x86 IOMMU, otherwise known as type 1 */
+ { RTE_VFIO_TYPE1, "Type 1", &vfio_type1_dma_map},
+ /* IOMMU-less mode */
+ { RTE_VFIO_NOIOMMU, "No-IOMMU", &vfio_noiommu_dma_map},
+};
+
int
vfio_get_group_fd(int iommu_group_no)
{
@@ -494,7 +505,7 @@ vfio_get_group_no(const char *sysfs_base,
return 1;
}
-int
+static int
vfio_type1_dma_map(int vfio_container_fd)
{
const struct rte_memseg *ms = rte_eal_get_physmem_layout();
@@ -526,7 +537,7 @@ vfio_type1_dma_map(int vfio_container_fd)
return 0;
}
-int
+static int
vfio_noiommu_dma_map(int __rte_unused vfio_container_fd)
{
/* No-IOMMU mode does not need DMA mapping */
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index b2b0d27..67a52c6 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
@@ -143,16 +143,6 @@ int vfio_setup_device(const char *sysfs_base, const char *dev_addr,
int vfio_enable(const char *modname);
int vfio_is_enabled(const char *modname);
-int vfio_type1_dma_map(int);
-int vfio_noiommu_dma_map(int);
-
-/* IOMMU types we support */
-static const struct vfio_iommu_type iommu_types[] = {
- /* x86 IOMMU, otherwise known as type 1 */
- { RTE_VFIO_TYPE1, "Type 1", &vfio_type1_dma_map},
- /* IOMMU-less mode */
- { RTE_VFIO_NOIOMMU, "No-IOMMU", &vfio_noiommu_dma_map},
-};
#define SOCKET_REQ_CONTAINER 0x100
#define SOCKET_REQ_GROUP 0x200