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 0D26AA2EEB for ; Thu, 12 Sep 2019 07:24:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D24401E537; Thu, 12 Sep 2019 07:24:27 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130083.outbound.protection.outlook.com [40.107.13.83]) by dpdk.org (Postfix) with ESMTP id 1D4001E4D3; Thu, 12 Sep 2019 07:24:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CzoR8cwWbRTEMLtdHoRPCBb/SHDWxzry1rNm2cM3sQiNpJIKbicMjFcMtFV92b2KEAxAxGtUr+KF4+hGrDK0OyvxIMLv/+GkfRlPf6ZgOWRlp3Dy4ds5GV410PHXYhOEjypiogvs0z8STvbkfYw0dcFj/g9alyCknYt2C3CE26uaPvp7Yd5PIvhJmcoM/kRwBltHIKbgprrqCuQPXyFA2KQqIg7eOX6xMmZL0BrR6ye5WTNABHZkAA9c9hL8fBiW2h02YEsYUb4udx3SOGZup8cmDSykJyfvefUPDcj2KnZAjtGTbCg4C7vDU49bRSgkq+UEhTdRMliK8Y2EsLmH/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HvpAmT/dXPEPbM0qqh/Jxvm7JVD7aNVHLMluCa3jXzk=; b=NpGtWSB9jOwTaCfjw8HkpLx1yNZitlNGyHnsRh6TQwCtMgxzjnycuALSJN0/PQ7TU40ZowucAx+qjjiZY2TZb6AeaYNwwWASmiXWPpmCpeLIYEGbtNvRuL6YXnZhtuYMw5Nfsm4PQWkPDNqqYoqoMf1zYEz/uGdNDUs1BiXgfDjmG0DX40MCaLChnzKrz28ZhGvRp0aGaH0ryc+edPFxoDV+3+ZPKQUOdFEbU+iKhzoAHQyaDGgTyvs9ZLKmMpipeV5M9DTpHYBJcQADVTecCaoPpyyyIlsdwDhXIeFELar223b5HTuXp7WbYGwYpVrL5YPVSU0cA8htIdCsFvQ+8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HvpAmT/dXPEPbM0qqh/Jxvm7JVD7aNVHLMluCa3jXzk=; b=jl7qUUjKEap9VAj55nYz+xlvAOJtPsCqpeuTMXauDhUHs6KZFLBgU0WgooXLS0GfDrXInVzYFkqpY4+05zQS/NtZhJNpCFG+L9UDIvFhAtKTv9E5IAopITlohEGIa6IWiwRqYe5uJLRIzhzCCA68z0rW+tO+ZakAfT5XrItOaLA= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.62.139) by VI1PR0401MB2574.eurprd04.prod.outlook.com (10.168.65.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.20; Thu, 12 Sep 2019 05:24:24 +0000 Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::3489:ebeb:d7fe:893e]) by VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::3489:ebeb:d7fe:893e%11]) with mapi id 15.20.2241.022; Thu, 12 Sep 2019 05:24:23 +0000 From: Hemant Agrawal To: Thierry Herbelot , "dev@dpdk.org" CC: Thomas Monjalon , "stable@dpdk.org" , Akhil Goyal Thread-Topic: [PATCH] drivers/crypto/dpaa_sec: update DPAA iova table in dpaa_mem_vtop Thread-Index: AQHVaLruby9ekDERiUW55WnL979E0acngnCw Date: Thu, 12 Sep 2019 05:24:23 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; x-originating-ip: [92.120.1.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5bbabb63-dc91-495e-a01a-08d737417903 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VI1PR0401MB2574; x-ms-traffictypediagnostic: VI1PR0401MB2574:|VI1PR0401MB2574: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01583E185C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(136003)(366004)(39860400002)(376002)(396003)(13464003)(199004)(189003)(26005)(99286004)(54906003)(2906002)(478600001)(110136005)(6506007)(53546011)(102836004)(6246003)(316002)(446003)(11346002)(7696005)(186003)(2501003)(14454004)(4326008)(3846002)(6116002)(86362001)(53936002)(229853002)(476003)(76116006)(486006)(9686003)(76176011)(55016002)(44832011)(7736002)(5660300002)(15650500001)(52536014)(66066001)(305945005)(74316002)(25786009)(8676002)(14444005)(66446008)(64756008)(66556008)(66476007)(256004)(66946007)(81166006)(81156014)(8936002)(6436002)(33656002)(71200400001)(71190400001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2574; H:VI1PR0401MB2541.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ENLwsnINU0qs7YXTgvh8aOA7G2bpb0D/VzKs3IgIyqNeIc5lRnMLpHh/5E7uvtwS3Pqkx0Xu0xIaCaN+HI5GG2bzggMOGG6V4zqNqDJ/Amg515qXfhSE16gzp/M5u7u3oXA9N4ArCaIpE22p7On6E86CigeCtocIHI0VuxfCPvg3LYCVdqEKkDBK5M9uIOwz26SKN0SMYyE3Ya3SqtWibypiqZhssSlEO8cY3OuTxOa8PC1UfqvoNCo4mEdubw3USqcxADpnub7G4fM01kYpnnfxu34/Cf915O2kFnx50O3Uee6xv9ntzQn9FGtc4rheppTGZmbDaGiSK3LQpyyuW6K/eSx6qzgqJ4HqViSVWCVU7xM63ziEkDOhBC/nnMBEaVutj2+E8OK9Cw+1aqr1Rv2rISkfIpBFazUjJxYrRnY= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5bbabb63-dc91-495e-a01a-08d737417903 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Sep 2019 05:24:23.7067 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SszCZGcxBr5qeWtTMxWB/IZu5rwNkgj278eSiKXM9G75709Hzkse4G8tdvc20C0amc+cycwLs572z63op9FAwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2574 Subject: Re: [dpdk-dev] [PATCH] 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" Hi Thierry, > -----Original Message----- > From: Thierry Herbelot > Sent: Wednesday, September 11, 2019 9:37 PM > To: dev@dpdk.org > Cc: Thomas Monjalon ; stable@dpdk.org; Akhil > Goyal ; Hemant Agrawal > > Subject: [PATCH] drivers/crypto/dpaa_sec: update DPAA iova table in > dpaa_mem_vtop > Importance: High >=20 > dpaa_sec needs translations between physical and virtual addresses. > V to P translation is relatively fast, as memory is managed in contiguous > segments. >=20 > The result of each V to P translation is used to update the DPAA iova tab= le, > which should be updated by a Mem event callback, but is not. > Then the DPAA iova table has entries for all needed memory ranges. >=20 > With this patch, dpaa_mem_ptov will always use dpaax_iova_table_get_va, > which ensures optimal performance. >=20 > Fixes: 5a7dbb934d75 ('dpaa: enable dpaax library') > Cc: stable@dpdk.org > Cc: akhil.goyal@nxp.com > Cc: hemant.agrawal@nxp.com >=20 > Signed-off-by: Thierry Herbelot > --- > drivers/crypto/dpaa_sec/dpaa_sec.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > 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 >=20 > enum rta_sec_era rta_sec_era; >=20 > @@ -100,8 +101,10 @@ dpaa_mem_vtop(void *vaddr) > const struct rte_memseg *ms; >=20 > ms =3D rte_mem_virt2memseg(vaddr, NULL); > - if (ms) > + if (ms) { > + dpaax_iova_table_update(ms->iova, (void *)ms->addr_64, > ms->len); [Hemant] This fails 32bit (i686) compilation=20 You can use "ms->addr" instead of "(void *)ms->addr_64" > return ms->iova + RTE_PTR_DIFF(vaddr, ms->addr); > + } > return (size_t)NULL; > } >=20 > -- > 2.20.1