From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 54A6F43B31; Fri, 16 Feb 2024 18:18:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 270274026A; Fri, 16 Feb 2024 18:18:33 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 76B8A40261 for ; Fri, 16 Feb 2024 18:18:32 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 26B61206B7; Fri, 16 Feb 2024 18:18:30 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v2] cryptodev: speed up ops pool create X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Fri, 16 Feb 2024 18:18:28 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F227@smartserver.smartshare.dk> In-Reply-To: <20240216170334.55210-1-andrew.boyer@amd.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v2] cryptodev: speed up ops pool create Thread-Index: Adpg+iZsWCwX2qVpSVaYZloXiYT4kAAAemkg References: <20240119164122.11829-1-andrew.boyer@amd.com> <20240216170334.55210-1-andrew.boyer@amd.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Andrew Boyer" , Cc: "Akhil Goyal" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Andrew Boyer [mailto:andrew.boyer@amd.com] > Sent: Friday, 16 February 2024 18.04 >=20 > Use rte_mempool_virt2iova(), which uses arithmetic based on the = mempool > state, rather than rte_mem_virt2iova(), which uses syscalls to look at > the proc filesystem. This speeds up pool create by more than 90%. >=20 > Signed-off-by: Andrew Boyer > --- > lib/cryptodev/rte_cryptodev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/cryptodev/rte_cryptodev.c > b/lib/cryptodev/rte_cryptodev.c > index b233c0ecd7..886eb7adc4 100644 > --- a/lib/cryptodev/rte_cryptodev.c > +++ b/lib/cryptodev/rte_cryptodev.c > @@ -2573,7 +2573,7 @@ rte_crypto_op_init(struct rte_mempool *mempool, >=20 > __rte_crypto_op_reset(op, type); >=20 > - op->phys_addr =3D rte_mem_virt2iova(_op_data); > + op->phys_addr =3D rte_mempool_virt2iova(_op_data); > op->mempool =3D mempool; > } >=20 > -- > 2.17.1 Reviewed-by: Morten Br=F8rup