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 7FBFBA00E6 for ; Thu, 8 Aug 2019 10:24:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 125CF1B464; Thu, 8 Aug 2019 10:23:18 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id F21C92BAE for ; Thu, 8 Aug 2019 10:23:01 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id t16so3865278wra.6 for ; Thu, 08 Aug 2019 01:23:01 -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=WVOoD1sfCiP3b4+2Dr7cF217rqzUFzzP90HVWU5suI8M50oGBnUqBH943aA9TVgJvo W+tlxXQz6xjtzVjRk9xcSqZJ20Y8IpBSXvpmnT+H/I7o5Xkd5h3NSYD6bZo8Cir8+Amz fgRxFpPc0HoY9T8/Mp4wYoKe9GEZ99XzSG0eD5Gb4L3locXvM7JyRBgdju8BX5eu9ib7 +AYi7xzZgbPr6JYV4LzSt12RX1fNn7qhZM5ppBKph0WmWTzNtL8C1Rfvhm1o5tScYmUQ DP2gne3VKZDbMMJde68/wLLmyOYkFvpyZv4Zs/0xLhPhHRqags8wlTvvss9DpJB1Q51e XSdA== 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=FoGEW9537jJjYqbeFp8rl+wBPIcYWshUMSeTeXCjVW8mm5ypdZBtYatBz0CwOv3Q7v rf2gAl4jTxBEdoDhgALlGANfiAvETuGzMtNveh83yTImDZGPY5k7NsmJXRXObIfynP0u fbiZau2kyPEDYzf1cabBwd9cwc4f3d4dW9xwZcfqTKrR78XEPJDroUGIV1QrwMcGb7WZ VgCy/3jq/SUcSyoe1vuufSaoQBzWQ6Waxmx1YZ3AVLmxY3Eud8/W4FOjFlpWoXWTUH4D 1SRr03Hgvy/VBNxDsshHJOrACquU9/ywkbUf/b9s+bWaSgLuph3LJBwIhd/m7dCPSmaC Qrig== X-Gm-Message-State: APjAAAUe1MAeL2CQ/poXlICtOBTFyV4B8BDmBG0DDBxG/r3fuOMSbinS 1p8O8AbfwSAVt8oMOgch0OEz7dmNtQ== X-Google-Smtp-Source: APXvYqwN9KuWZXpc5zYdEoajdWsokBaLeU0MaaobkVY42LsW8mplZsvJ4SDrNnqmKnpiEnIRjhVdZQ== X-Received: by 2002:adf:fd08:: with SMTP id e8mr16201928wrr.147.1565252581528; Thu, 08 Aug 2019 01:23: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 t13sm111437018wrr.0.2019.08.08.01.23.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Aug 2019 01:23:00 -0700 (PDT) From: Thierry Herbelot To: dev@dpdk.org Cc: stable@dpdk.org, Thomas Monjalon Date: Thu, 8 Aug 2019 10:22:16 +0200 Message-Id: <0a38b175a96089fc9473fb14df78826d78966dd3.1565252336.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 V3 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