From: Thierry Herbelot Date: Thu, 12 Sep 2019 08:38:21 +0000 (+0200) Subject: crypto/dpaa_sec: fix IOVA table X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=12e5842945bf;p=dpdk.git crypto/dpaa_sec: fix IOVA table 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@dpdk.org Signed-off-by: Thierry Herbelot Acked-by: Hemant Agrawal --- diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index fd5b24840f..39c9271ffd 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -38,6 +38,7 @@ #include #include #include +#include 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, ms->addr, ms->len); return ms->iova + RTE_PTR_DIFF(vaddr, ms->addr); + } return (size_t)NULL; }