bus/dpaa: setting the iova mode as physical

Message ID 1510056908-8372-2-git-send-email-hemant.agrawal@nxp.com
State New
Headers show
Series
  • bus/dpaa: setting the iova mode as physical
Related show

Commit Message

Hemant Agrawal Nov. 7, 2017, 12:15 p.m.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 drivers/bus/dpaa/dpaa_bus.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.7.4

Patch

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index dc58e17..1cc8c89 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -484,11 +484,21 @@  rte_dpaa_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
 	return NULL;
 }
 
+/*
+ * Get iommu class of DPAA2 devices on the bus.
+ */
+static enum rte_iova_mode
+rte_dpaa_get_iommu_class(void)
+{
+	return RTE_IOVA_PA;
+}
+
 struct rte_dpaa_bus rte_dpaa_bus = {
 	.bus = {
 		.scan = rte_dpaa_bus_scan,
 		.probe = rte_dpaa_bus_probe,
 		.find_device = rte_dpaa_find_device,
+		.get_iommu_class = rte_dpaa_get_iommu_class,
 	},
 	.device_list = TAILQ_HEAD_INITIALIZER(rte_dpaa_bus.device_list),
 	.driver_list = TAILQ_HEAD_INITIALIZER(rte_dpaa_bus.driver_list),