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 90902A00E6 for ; Wed, 7 Aug 2019 16:38:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 60E3E1B9D5; Wed, 7 Aug 2019 16:38:22 +0200 (CEST) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 299F62C6A for ; Wed, 7 Aug 2019 16:38:02 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id n4so91716555wrs.3 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=nwM3H+++t81vnbIofoD4wJQkRidfQqXV4T68WaYt3+pSf9cUxyBZzUsLjPzT4RyY2y BJOiEqXbjXWllbitfaod6+g12SFwngCF+OO30FsclSYA6daS1Jy/Af48AcNtjiXCsqJD 9z/yEuochWtwmvTZ3/e+c8VhLGMz4Vb2q7v4OE4XVW9I02/pyZ+cb4nUsmV/0EON6HBO chskmmwtVCJyUSKAlL0vKbCF0TI1O9xExwAtjxyE6cWVWgWFXUfnxJUtox0khVjpNOkt UYLtUoPA0wAZVcoZsf0gYc+occmhA8F8xIy0x7hE6s80/eT6Ti7iqcB+XwB4MJdAsi3f kZiA== X-Gm-Message-State: APjAAAXtg4MV3rWqFSG8TscXYNKVh3OccNiwdh9IzPYjYgh/fARqrLv6 YUfv6EteYmsirQxv3hJK3CpR 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-stable] [PATCH 19.11 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 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