crypto/caam_jr: integrate DPAAX table
authorGagandeep Singh <g.singh@nxp.com>
Mon, 2 Sep 2019 12:27:47 +0000 (17:57 +0530)
committerAkhil Goyal <akhil.goyal@nxp.com>
Wed, 9 Oct 2019 09:50:12 +0000 (11:50 +0200)
Virtual to physical conversions are optimized using the
DPAAX tables. This patch integrates DPAAX with caam_jr PMD.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
drivers/crypto/caam_jr/Makefile
drivers/crypto/caam_jr/caam_jr_pvt.h

index cecfbbd..0a8a215 100644 (file)
@@ -39,5 +39,6 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_dpaa
 LDLIBS += -lrte_bus_vdev
+LDLIBS += -lrte_common_dpaax
 
 include $(RTE_SDK)/mk/rte.lib.mk
index 9f1adab..d32291b 100644 (file)
@@ -6,6 +6,7 @@
 #define CAAM_JR_PVT_H
 
 #include <hw/desc/ipsec.h>
+#include <dpaax_iova_table.h>
 
 /* NXP CAAM JR PMD device name */
 
@@ -254,6 +255,11 @@ caam_jr_mem_vtop(void *vaddr)
 static inline void *
 caam_jr_dma_ptov(rte_iova_t paddr)
 {
+       void *va;
+       va = dpaax_iova_table_get_va(paddr);
+       if (likely(va != NULL))
+               return va;
+
        return rte_mem_iova2virt(paddr);
 }