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 CCE05A00E6 for ; Wed, 7 Aug 2019 17:10:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7077F1B970; Wed, 7 Aug 2019 17:10:15 +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 9594E2C58 for ; Wed, 7 Aug 2019 17:09:50 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id p13so17167828wru.10 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=BNWsPoSMPy/fXpgswjlxBnrYuE7VO2NousN25D4m06OdWWYhkmuXHF8P7ZIl0iqpOL PU8nnmBVnpw1FB3ZkXUnUP6b3orhxeH6FJtcgHZoHuKZGConWSdIqp/IA9BYY0FuUVjR 2hLskT9CekK/MQRIYqfzHq/TWma/pnVtHHGlu87A91V/jL67iD8vg8SA/PqINS67TVpF Mcrheo0VKHhxVIaUj/t4zh6gCRn9ihB+zCvjf7g9CvYiLiA+9WtC6nDmxEDgJ7z/uEoa x7R8SznA+Q+ztAu7D5jqTqJpKLHvKog7HSjjfLvpJFrf7ReMJpMFPj7Au10XM7ByijZ0 0I6Q== X-Gm-Message-State: APjAAAW+wcGG803mSL5PTtHLM95VVVr4OIxNhjPUZPREFMbVWkJjHozY eKBDLQ7Sal8zUiN/1bcINTRq 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-stable] [PATCH 19.11 V2 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