DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: dev@dpdk.org
Cc: hemant.agrawal@nxp.com, Gagandeep Singh <g.singh@nxp.com>
Subject: [dpdk-dev] [PATCH 2/2] crypto/caam_jr: integrate DPAAX table
Date: Mon,  2 Sep 2019 17:57:47 +0530	[thread overview]
Message-ID: <20190902122747.1393-2-akhil.goyal@nxp.com> (raw)
In-Reply-To: <20190902122747.1393-1-akhil.goyal@nxp.com>

From: Gagandeep Singh <g.singh@nxp.com>

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      | 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 cecfbbdc8..0a8a2150b 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 9f1adabc7..d32291b60 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 <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);
 }
 
-- 
2.17.1


  reply	other threads:[~2019-09-02 12:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 12:27 [dpdk-dev] [PATCH 1/2] crypto/caam_jr: reduce the function trace from critical path Akhil Goyal
2019-09-02 12:27 ` Akhil Goyal [this message]
2019-09-19 15:08 ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190902122747.1393-2-akhil.goyal@nxp.com \
    --to=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=g.singh@nxp.com \
    --cc=hemant.agrawal@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).