From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so2.wedos.net (wes1-so2.wedos.net [46.28.106.16]) by dpdk.org (Postfix) with ESMTP id 6F6ED37B2 for ; Fri, 29 Apr 2016 15:46:20 +0200 (CEST) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so2.wedos.net (Postfix) with ESMTPSA id 3qxFND1MvBz7Jg; Fri, 29 Apr 2016 15:46:20 +0200 (CEST) From: Jan Viktorin To: dev@dpdk.org Cc: Jan Viktorin , Anatoly Burakov , David Marchand , Keith Wiles , Santosh Shukla , Stephen Hemminger Date: Fri, 29 Apr 2016 15:44:13 +0200 Message-Id: <1461937456-22943-13-git-send-email-viktorin@rehivetech.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1461937456-22943-1-git-send-email-viktorin@rehivetech.com> References: <1461937456-22943-1-git-send-email-viktorin@rehivetech.com> Subject: [dpdk-dev] [PATCH 12/15] vfio: make vfio_*_dma_map and iommu_types private X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2016 13:46:20 -0000 There is no more reason to expose those definitions as nobody uses them. Signed-off-by: Jan Viktorin --- lib/librte_eal/linuxapp/eal/eal_vfio.c | 15 +++++++++++++-- lib/librte_eal/linuxapp/eal/eal_vfio.h | 11 ----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c index 7dce880..3f03f45 100644 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.c +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c @@ -47,6 +47,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) { @@ -477,7 +488,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(); @@ -509,7 +520,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 d4532a5..f8728bd 100644 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.h +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h @@ -149,17 +149,6 @@ int vfio_is_enabled(const char *modname); #define SOCKET_NO_FD 0x1 #define SOCKET_ERR 0xFF -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 VFIO_PRESENT #endif /* kernel version */ #endif /* RTE_EAL_VFIO */ -- 2.8.0