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 6AABEA00E6 for ; Wed, 7 Aug 2019 17:11:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 03A171B997; Wed, 7 Aug 2019 17:10:16 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id E1A452BAE for ; Wed, 7 Aug 2019 17:09:50 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id t16so1629746wra.6 for ; Wed, 07 Aug 2019 08:09:50 -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=qbR4eKm2X2yiS35j1GS57v5Crh1YgHbCyV1LrGXr3mo=; b=d/Q9TnSBrmfrR6thIrarPyT3Ro4oC00Xu/SjosegYOUusCZzBIfMwm9njG5/kFkkWk xuBDGgIIIOVom2VC+wpJRWqMMEwigYaQCsDb0dVKL96UUx6eBg9QppSsLYWufMKR4tDJ 3XxRHj3HdFTJDsyiU/oAvF894uvvzvA1NeDECt0UrXz+DAcVJ/Ga0m6H7kGA7Zud98rn 8a86DKV4ABUdn7so+yXQutquI3ar8E3hNWALpF1eOIdtdlNgpEAm5YglM68EDDbMwmvC +BP/IXa7FaiZFlhjQpsNi4NN8rAuZHza+IeltewPMDiyC1humNkRPYjprNEXm/ZkVWRo m5Xg== 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=qbR4eKm2X2yiS35j1GS57v5Crh1YgHbCyV1LrGXr3mo=; b=aHENHJyX0FsOWzXempU6ZRUmNUxM8b9/vsBQoKa5pzcqtVpLjMqRrrRtH4uFzeOHzR zbcLTRAJx8DyngwV3nst8qqBsYRowA+GG+JvjeG3gixQ0hWIqatQJE1R8y9tVPtCoIdu 0MB9NMlNrFrAN/7ydENV34fESqmHXqTb2tS+ZSm9qu4a5KOkkcRBjvc/yYsHv9l19aiv id8HTs6DwTIdAaG1IV/XgC6i9BJr0oi00CusI0O/FjsVCInik3KXSZLF1DuaQz0s4/wn ONHJw7t5CZAhJXzDNoHd/cucL4w7XgxpBZQ92g4b9np1traH6f0/7lXfKjXXTIP2zlgy PDjA== X-Gm-Message-State: APjAAAX6YHexebsXRZxh6yygFTD1ZJbcr2vpFjtBcQ2T++O2olYBM/hS 8zWx37hY57+l+aBgK4zKm6DGvT6h4w== X-Google-Smtp-Source: APXvYqyqN42gdyouHCcIBbcZIclQT/p3d/znUX30MVWgdDV6mpabNn4eDAqatDVPzMZYgpaGdlzRdw== X-Received: by 2002:a5d:4111:: with SMTP id l17mr11574172wrp.59.1565190590440; Wed, 07 Aug 2019 08:09:50 -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 r5sm382862wmh.35.2019.08.07.08.09.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Aug 2019 08:09:49 -0700 (PDT) From: Thierry Herbelot To: dev@dpdk.org Cc: stable@dpdk.org, Thomas Monjalon Date: Wed, 7 Aug 2019 17:09:20 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 19.11 V2 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@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