From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC300A00E6 for ; Wed, 7 Aug 2019 16:39:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 742C61B9DF; Wed, 7 Aug 2019 16:38:22 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 62D012F42 for ; Wed, 7 Aug 2019 16:38:02 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id t16so1520779wra.6 for ; Wed, 07 Aug 2019 07:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=0KkrHrniPVrFgJyYqqRxhR3IH+801XMnfyuDrBVVu/I=; b=UAq7wNxLzJRFO4J36i2DdB1zquQXvEEtGhL00Ppi8wl/qbNgvRl1LJUqLTVEh+zQ5Y 0Z/QFSSl/NTaxdEKu6p4R7TJ3tmE52XJnl5gn8EgPVMIKdL1rYJpEZGTaJPDwNulci8g 153Ptv0MwWEyYFOmJR7zyIHiXj/QS1GtuKmyW8wPcB6zMDgtmTy04+tFC/mVewXQODsn swNXG8/57oexDWjez8QP0/fQ4Yp9ntZEzuRireaOhSOyGXlJxI7AlEWzE8j1ThfiTNkD 1YpPAAGRHm8ChiR4wpIQEHsHA1qy/YQ6GWxQYpjIcdWbW/wbnGqgyiPx7Kd+mf20tFwZ SH2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=0KkrHrniPVrFgJyYqqRxhR3IH+801XMnfyuDrBVVu/I=; b=R52yziENLUhvh+wn2fciy0+OL7v+kJU4a+ZXWUCLVRqRfQKf8gezIpVJFRmGAIY5zf yU9ggJUje1jHqPrmJY4fzj5IPlsnuOE5CRo8OS4X6MRAFboLFXOCR4Ct9A5rN8WS95mt qsTya4RH8LCkgquc8Eny3wa7D6LorMTG5mtwLqqbPWQ7f4VBpwngFgP0DZtdCnlFBsYD ghcCc8DDIez9pPi8IdvpAEqNnfAkvdxlms/p0ruHfT4BDOWMXEOmtw3dXy3IOgbPu9IG nFrDMcveI0Ha/qsXErNbU7RIdj24X4fLymhXVDmlP3IxwaS5XZAwx5waT8pNiZ5ZXu3q lL6A== X-Gm-Message-State: APjAAAVKda4A0uL10XhFyYCp3M2sVRE14/zlbMMZr+DTy+/eS7MnqLn3 xtHfIIoBNkHXu41UFdPUoeraNSLAxA== X-Google-Smtp-Source: APXvYqzNBemR/SARTibc0hVAUM9QV8XVsq8R9DiS3WDOgYGq9RJ/XtycJPjXPcaTU7Btp2l/qA/1lg== X-Received: by 2002:adf:e94e:: with SMTP id m14mr8495777wrn.230.1565188681989; Wed, 07 Aug 2019 07:38:01 -0700 (PDT) Received: from ascain.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 2sm133441211wrn.29.2019.08.07.07.38.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Aug 2019 07:38:00 -0700 (PDT) From: Thierry Herbelot To: dev@dpdk.org Cc: stable@dpdk.org, Thomas Monjalon Date: Wed, 7 Aug 2019 16:37:30 +0200 Message-Id: <0cfc91749bb6fe10493ecdf13994d873bbe2ce57.1565188248.git.thierry.herbelot@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 19.11 11/12] drivers/crypto/dpaa_sec: update DPAA iova table in dpaa_mem_vtop X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 #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, (void *)ms->addr_64, ms->len); return ms->iova + RTE_PTR_DIFF(vaddr, ms->addr); + } return (size_t)NULL; } -- 2.11.0