patches for DPDK stable branches
 help / color / Atom feed
From: Thierry Herbelot <thierry.herbelot@6wind.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Thomas Monjalon <thomas@monjalon.net>
Subject: [dpdk-stable] [PATCH 19.11 11/12] drivers/crypto/dpaa_sec: update DPAA iova table in dpaa_mem_vtop
Date: Wed,  7 Aug 2019 16:37:30 +0200
Message-ID: <0cfc91749bb6fe10493ecdf13994d873bbe2ce57.1565188248.git.thierry.herbelot@6wind.com> (raw)
In-Reply-To: <cover.1565188248.git.thierry.herbelot@6wind.com>

dpaa_sec needs translations between physical and virtual addresses. V to P
translation is relatively fast, as memory is managed in contiguous segments.

The result of each V to P translation is used to update the DPAA iova table,
which should be updated by a Mem event callback, but is not.
Then the DPAA iova table has entries for all needed memory ranges.

With this patch, dpaa_mem_ptov will always use dpaax_iova_table_get_va, which
ensures optimal performance.

Fixes: 5a7dbb934d75 ('dpaa: enable dpaax library')
Cc: stable at dpdk.org

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 122c80a072ff..22b8b1d63ce0 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -38,6 +38,7 @@
 #include <rte_dpaa_bus.h>
 #include <dpaa_sec.h>
 #include <dpaa_sec_log.h>
+#include <dpaax_iova_table.h>
 
 enum rta_sec_era rta_sec_era;
 
@@ -100,8 +101,10 @@ dpaa_mem_vtop(void *vaddr)
 	const struct rte_memseg *ms;
 
 	ms = rte_mem_virt2memseg(vaddr, NULL);
-	if (ms)
+	if (ms) {
+		dpaax_iova_table_update(ms->iova, (void *)ms->addr_64, ms->len);
 		return ms->iova + RTE_PTR_DIFF(vaddr, ms->addr);
+	}
 	return (size_t)NULL;
 }
 
-- 
2.11.0


  parent reply index

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 14:37 [dpdk-stable] [PATCH 19.11 00/12] Miscellaneous fixes Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 01/12] net/ixgbevf: fix stats update after a PF reset Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 02/12] ethdev: fix description of tx descriptor status Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 03/12] net/e1000: fix Tx descriptor status api (igb) Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 04/12] net/e1000: fix Tx descriptor status api (em) Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 05/12] net/ixgbe: fix Tx descriptor status api Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 06/12] net/i40e: " Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 07/12] net/i40e: set speed to undefined for default case in link update Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 08/12] virtio: fix rx stats with vectorized functions Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 09/12] virtio: get all pending rx packets " Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 10/12] drivers/crypto/openssl: use a local copy for the session contexts Thierry Herbelot
2019-08-07 14:37 ` Thierry Herbelot [this message]
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 12/12] drivers/crypto/octeontx: enable unbinding for the OcteonTx crypto engines Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 00/12] Miscellaneous fixes Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 " Thierry Herbelot
2019-08-08 13:19     ` Thierry Herbelot
2019-08-08 14:34       ` Thomas Monjalon
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 01/12] net/ixgbevf: fix stats update after a PF reset Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 02/12] ethdev: fix description of tx descriptor status Thierry Herbelot
2019-08-08 10:37     ` [dpdk-stable] [dpdk-dev] " Andrew Rybchenko
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 03/12] net/e1000: fix Tx descriptor status api (igb) Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 04/12] net/e1000: fix Tx descriptor status api (em) Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 05/12] net/ixgbe: fix Tx descriptor status api Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 06/12] net/i40e: " Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 07/12] net/i40e: set speed to undefined for default case in link update Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 08/12] virtio: fix rx stats with vectorized functions Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 09/12] virtio: get all pending rx packets " Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 10/12] drivers/crypto/openssl: use a local copy for the session contexts Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 11/12] drivers/crypto/dpaa_sec: update DPAA iova table in dpaa_mem_vtop Thierry Herbelot
2019-08-08  8:22   ` [dpdk-stable] [PATCH 19.11 V3 12/12] drivers/crypto/octeontx: enable unbinding for the OcteonTx crypto engines Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 01/12] net/ixgbevf: fix stats update after a PF reset Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 02/12] ethdev: fix description of tx descriptor status Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 03/12] net/e1000: fix Tx descriptor status api (igb) Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 04/12] net/e1000: fix Tx descriptor status api (em) Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 05/12] net/ixgbe: fix Tx descriptor status api Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 06/12] net/i40e: " Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 07/12] net/i40e: set speed to undefined for default case in link update Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 08/12] virtio: fix rx stats with vectorized functions Thierry Herbelot
2019-08-08  5:15   ` Tiwei Bie
2019-08-08  7:35     ` Thibaut Collet
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 09/12] virtio: get all pending rx packets " Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 10/12] drivers/crypto/openssl: use a local copy for the session contexts Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 11/12] drivers/crypto/dpaa_sec: update DPAA iova table in dpaa_mem_vtop Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 12/12] drivers/crypto/octeontx: enable unbinding for the OcteonTx crypto engines Thierry Herbelot

Reply instructions:

You may reply publically 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=0cfc91749bb6fe10493ecdf13994d873bbe2ce57.1565188248.git.thierry.herbelot@6wind.com \
    --to=thierry.herbelot@6wind.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox