From mboxrd@z Thu Jan 1 00:00:00 1970 From: Santosh Shukla Subject: [PATCH v5 04/12] bsdapp/eal_pci: get iommu class Date: Mon, 24 Jul 2017 14:09:56 +0530 Message-ID: <20170724084004.25542-5-santosh.shukla@caviumnetworks.com> References: <20170718055950.10208-1-santosh.shukla@caviumnetworks.com> <20170724084004.25542-1-santosh.shukla@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: hemant.agrawal@nxp.com, bruce.richardson@intel.com, jerin.jacob@caviumnetworks.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 NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0058.outbound.protection.outlook.com [104.47.36.58]) by dpdk.org (Postfix) with ESMTP id 173177CB0 for ; Mon, 24 Jul 2017 10:42:21 +0200 (CEST) In-Reply-To: <20170724084004.25542-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 Reviewed-by: Maxime Coquelin --- 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 d3fb3c2d0..b45649428 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 3d3c70a88..8d5bc5000 100644 --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map @@ -241,5 +241,6 @@ DPDK_17.11 { global: rte_pci_match; + rte_pci_get_iommu_class; } DPDK_17.08; -- 2.11.0