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 B7E63A00E6 for ; Thu, 8 Aug 2019 10:23:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D714C7CDE; Thu, 8 Aug 2019 10:23:17 +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 B4BF8231E for ; Thu, 8 Aug 2019 10:23:01 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id t16so3865268wra.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=K870dNzobh4y1bscYak61VR1UwJxrgjC3yBVACXBBtqM53PAJFsw3FIzu6PoKFJXeD MfcRs8CJcgXuzmraxDdzs2Mjisdl12d+RPxNcInSl2Xz2BQsWTjdVfLf1i9EP3BDqYa6 qOE4hEPY6GNPioRrZB+k0othXsijSmvrDnsQBn1jUhHH/8BrEpQQoL5H++Cn6h7THlOY ypDMZI7M01NZf0LV4TD1YViKwz68uNeo8MbAJ45F307QoRjyN5LL4ifryaY7j+JFzksJ c4izDMXYMPKoqYIei8IbuN/TB4vDXUnVlHgqgdMcS8qs8s9N9PeKkYathqoQ4u9erbPM o3Rg== X-Gm-Message-State: APjAAAWMK+lWTaqf5Bo5Do9cNV6qfBS/AuN6iKGpAeRM8HaY/ufCwer7 +x4a5NwH/yTGZBwZ6AnN8XHHNSdrSQ== 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-stable] [PATCH 19.11 V3 11/12] drivers/crypto/dpaa_sec: update DPAA iova table in dpaa_mem_vtop X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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