From mboxrd@z Thu Jan 1 00:00:00 1970 From: Santosh Shukla Subject: [PATCH v4 04/12] bsdapp/eal_pci: get iommu class Date: Tue, 18 Jul 2017 11:29:42 +0530 Message-ID: <20170718055950.10208-5-santosh.shukla@caviumnetworks.com> References: <20170711061631.5018-1-santosh.shukla@caviumnetworks.com> <20170718055950.10208-1-santosh.shukla@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: bruce.richardson@intel.com, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com, gaetan.rivet@6wind.com, sergio.gonzalez.monroy@intel.com, anatoly.burakov@intel.com, stephen@networkplumber.org, maxime.coquelin@redhat.com, olivier.matz@6wind.com, Santosh Shukla To: thomas@monjalon.net, dev@dpdk.org Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0070.outbound.protection.outlook.com [104.47.33.70]) by dpdk.org (Postfix) with ESMTP id 0C0A97CAC for ; Tue, 18 Jul 2017 08:00:54 +0200 (CEST) In-Reply-To: <20170718055950.10208-1-santosh.shukla@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Bsdapp case returns default iova mode. Signed-off-by: Santosh Shukla Signed-off-by: Jerin Jacob --- v3 --> v4: - Removed rte_pci_get_iommu_class api declaration. Now that sits into separate patch [03/12]. lib/librte_eal/bsdapp/eal/eal_pci.c | 10 ++++++++++ lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 + 2 files changed, 11 insertions(+) diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index dcb3b51ad..965255f79 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -403,6 +403,16 @@ rte_pci_scan(void) return -1; } +/* + * Get iommu class of pci devices on the bus. + */ +enum rte_iova_mode +rte_pci_get_iommu_class(void) +{ + /* Supports only RTE_KDRV_NIC_UIO */ + return RTE_IOVA_PA; +} + int pci_update_device(const struct rte_pci_addr *addr) { diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map index e81cbb286..4b25318be 100644 --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map @@ -201,6 +201,7 @@ DPDK_17.08 { rte_bus_find_by_device; rte_bus_find_by_name; rte_pci_match; + rte_pci_get_iommu_class; } DPDK_17.05; -- 2.11.0