From 9e727d4a3fd4f25489fdede0218319751213c492 Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Mon, 2 Sep 2019 17:57:47 +0530 Subject: [PATCH] crypto/caam_jr: integrate DPAAX table Virtual to physical conversions are optimized using the DPAAX tables. This patch integrates DPAAX with caam_jr PMD. Signed-off-by: Gagandeep Singh Acked-by: Akhil Goyal --- drivers/crypto/caam_jr/Makefile | 1 + drivers/crypto/caam_jr/caam_jr_pvt.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/drivers/crypto/caam_jr/Makefile b/drivers/crypto/caam_jr/Makefile index cecfbbdc8c..0a8a2150be 100644 --- a/drivers/crypto/caam_jr/Makefile +++ b/drivers/crypto/caam_jr/Makefile @@ -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 diff --git a/drivers/crypto/caam_jr/caam_jr_pvt.h b/drivers/crypto/caam_jr/caam_jr_pvt.h index 9f1adabc7d..d32291b605 100644 --- a/drivers/crypto/caam_jr/caam_jr_pvt.h +++ b/drivers/crypto/caam_jr/caam_jr_pvt.h @@ -6,6 +6,7 @@ #define CAAM_JR_PVT_H #include +#include /* 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); } -- 2.20.1