New upstream version 18.11-rc1
[deb_dpdk.git] / drivers / bus / dpaa / rte_dpaa_bus.h
index 15dc6a4..1d580a0 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <rte_bus.h>
 #include <rte_mempool.h>
+#include <dpaax_iova_table.h>
 
 #include <fsl_usd.h>
 #include <fsl_qman.h>
@@ -110,6 +111,11 @@ extern struct dpaa_memseg_list rte_dpaa_memsegs;
 static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr)
 {
        struct dpaa_memseg *ms;
+       void *va;
+
+       va = dpaax_iova_table_get_va(paddr);
+       if (likely(va != NULL))
+               return va;
 
        /* Check if the address is already part of the memseg list internally
         * maintained by the dpaa driver.