[dpdk-dev] [PATCH] bus/fslmc: set the bus iova mode as physical

Hemant Agrawal hemant.agrawal at nxp.com
Tue Nov 7 13:15:06 CET 2017


Setting the default iova mode as physical.

Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
Though the DPAA2 can support virtual mode, but that require other changes in the
code as well, so setting it as physical for time being.

 drivers/bus/fslmc/fslmc_bus.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 0a8229f..480857e 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -346,11 +346,21 @@ rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver)
 	driver->fslmc_bus = NULL;
 }
 
+/*
+ * Get iommu class of DPAA2 devices on the bus.
+ */
+static enum rte_iova_mode
+rte_dpaa2_get_iommu_class(void)
+{
+	return RTE_IOVA_PA;
+}
+
 struct rte_fslmc_bus rte_fslmc_bus = {
 	.bus = {
 		.scan = rte_fslmc_scan,
 		.probe = rte_fslmc_probe,
 		.find_device = rte_fslmc_find_device,
+		.get_iommu_class = rte_dpaa2_get_iommu_class,
 	},
 	.device_list = TAILQ_HEAD_INITIALIZER(rte_fslmc_bus.device_list),
 	.driver_list = TAILQ_HEAD_INITIALIZER(rte_fslmc_bus.driver_list),
-- 
2.7.4



More information about the dev mailing list