From d415e4d18c316f21b83ecf21bbc7101b5906835e Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Tue, 6 Feb 2018 22:52:48 +0530 Subject: [PATCH] bus/dpaa: fix default IOVA mode Fix dpaa bus returning IOVA as PA even when it is not running on dpaa platform. Fixes: 1ee9569576f6 ("config: enable dpaaX drivers for generic ARMv8") Fixes: d5a4e3a00c4a ("bus/dpaa: set IOVA mode as physical") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh Acked-by: Hemant Agrawal --- drivers/bus/dpaa/dpaa_bus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 290b967daf..f2bb3b1580 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -541,6 +541,10 @@ rte_dpaa_find_device(const struct rte_device *start, rte_dev_cmp_t cmp, static enum rte_iova_mode rte_dpaa_get_iommu_class(void) { + if ((access(DPAA_DEV_PATH1, F_OK) != 0) && + (access(DPAA_DEV_PATH2, F_OK) != 0)) { + return RTE_IOVA_DC; + } return RTE_IOVA_PA; } -- 2.20.1