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 89326A00BE; Thu, 10 Feb 2022 15:34:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17090426EE; Thu, 10 Feb 2022 15:34:17 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 802EF4013F for ; Thu, 10 Feb 2022 15:34:15 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 21AAJpRH009567; Thu, 10 Feb 2022 06:34:06 -0800 Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2169.outbound.protection.outlook.com [104.47.73.169]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3e50uc92sr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Feb 2022 06:34:06 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BKCjZMntclQ5cVTeThCtofdwMJK5e+EpjqykNjEXQu2LvcHBpIa9C2O+lAH/lir2rGHapBgemGPO6oSq8LPWSKAi5Df2ti1KYvNR4tjTpKT9Ms97E65iOfBm+k69pdzHoz2c2zYVPqdgse3xIkQi7Sh50KA803XaYsi9RWMgGo/ThogfgLEC8nQtEjvXTe6MqVSSETywtW35xiKemKmdUmwCKMZ4pKgFkg0kRTW1CXRIRxoQ3QXliXsmX5i+tzwgvEqsLSIuNzo5BkY2ecIZwHYgZO6sXukbQ4z+Oc9TzOGRR0jwK6242qUCjjcFIV7e3KNt7AJ2cABhPM9jDbS1ZQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5fZr53FiE+azIsO57YWpT/bDnzjyl0MtaihEvsPRGlY=; b=n2Lr2Ganzjfb6Gy9tec3uBy5JOgZ8BG8V4saoj3DuhCyKtX93LBANKAvtU3x+vwozIJmxBLAZbPBtA1kQnhNYYes711R2OlU6qjfitdNvvV8AtcLN/5ALpIhDo7NZcLsXvEGqFs3fUD9oXUgHQYnG3WZeD5r70Ms+UJNzM/m7AAa4ZajVf4UylxE0yBYToGw8mZoUU1l1wgUhqwd5h2sM63mKHgiL1Akvtkt2A+nJcNO4wHzySNe6LWz14scpmHYnsugjVfo8wvP8CzMZmtv9ah4F9CP530/8P3PAieSzLdCOVTDBg+1QVFo33GeNPJCYP6wRdDdpzwz6mZ/LG/F3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5fZr53FiE+azIsO57YWpT/bDnzjyl0MtaihEvsPRGlY=; b=GiCItvysuXsDgYwGu8c6ZbmfvDx6aBRu7adMKpYJ/QOXXHQ6ssAKWXu/Fc95N1ANlG2jWe0u0akPyf6sz+JQbOa/LzZiZ21idEjONsK9HG6QP2HGENAKOqcl4zhT2TMQsGOEWd4MFOIAyfhkZ1S6PC0hZ7QTFPSPmnf0D+Nv6Vo= Received: from SA1PR18MB4661.namprd18.prod.outlook.com (2603:10b6:806:1d4::16) by BN6PR18MB1123.namprd18.prod.outlook.com (2603:10b6:404:75::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.14; Thu, 10 Feb 2022 14:34:03 +0000 Received: from SA1PR18MB4661.namprd18.prod.outlook.com ([fe80::fda6:65d0:1b90:1fe7]) by SA1PR18MB4661.namprd18.prod.outlook.com ([fe80::fda6:65d0:1b90:1fe7%5]) with mapi id 15.20.4975.011; Thu, 10 Feb 2022 14:34:03 +0000 From: Anoob Joseph To: Ciara Power , "dev@dpdk.org" CC: "roy.fan.zhang@intel.com" , Akhil Goyal , "mdr@ashroe.eu" , Declan Doherty , Ankur Dwivedi , Tejasree Kondoj , John Griffin , Fiona Trahe , Deepak Kumar Jain Subject: RE: [EXT] [PATCH v5 2/5] crypto: use single buffer for asymmetric session Thread-Topic: [EXT] [PATCH v5 2/5] crypto: use single buffer for asymmetric session Thread-Index: AQHYHobT0clMcG9vQE6e56iGaHdPaKyM1zEw Date: Thu, 10 Feb 2022 14:34:03 +0000 Message-ID: References: <20220209153854.2740455-1-ciara.power@intel.com> <20220210140153.3439676-1-ciara.power@intel.com> <20220210140153.3439676-3-ciara.power@intel.com> In-Reply-To: <20220210140153.3439676-3-ciara.power@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0fae5bce-0676-43e9-5d8f-08d9eca262dc x-ms-traffictypediagnostic: BN6PR18MB1123:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jbpTybKk/vtIPv9aGeU1GGngRE4Xj06oNYQKlNo9auA8EYBRV4JInHdTGdDkuVwsevImvHGHc0nTU100Wjhor4EiimP/2bTLdcnGeppcgtlMkrBn5L5EygFM8WaHBjt0B9uAus9FugzFLBy/60MnYvQcWa5pqdVxW0D5d+3yhdcsRD1ParkB5m0hsopocLU1+zUodsX3WNvyvYy2LIGdvzVSrzDrquEj8DKcIP3rdufetToEKq9ngT7dYSLAJqDF5Hb01wwP42Z8Zet4O/htNlXfKgTQX7D0xV4TGTVYsjsBQaIT0dos1PyI3SJkgEiAJSIVzKtUtzNJljPSKs1o+YFQ1IOmZ/spoGRSjqzitRZY3x6tYUEyX7qRk7H+40t2MALk61RxhagGHci7e98TT+o6CI3ldNCUvSgRC+qDtuXxmFd8oHl6hLlCup+hdvbmXndcMlw0VPuBrfOvEXCrlO7aNnRM0wzNGiBvIMAqbNFr4NYZ67VDTyUp5m1gtHawuNEYk1KW9KiFqTGzLEGiuFxpdOBoGkOaaKBbZ9lHltHYTj7sG+OQ4JTmirisyliAoKDklIlwZlNnDMdeikNMOQympBwVno1DdNxDuoipG2o4WPnKMuVCaEVxHeMA2viOv9+3dLF1+lWOfzGOxQ930y6l7T/fbZQ4c2okK7esg0/74nWvx3ufm+JTP2I0joRVwwKqIjNVm3lEMyW8UFDWhg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA1PR18MB4661.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(2906002)(55016003)(110136005)(38100700002)(71200400001)(83380400001)(186003)(316002)(54906003)(9686003)(52536014)(6506007)(66946007)(66476007)(64756008)(66556008)(7696005)(4326008)(8676002)(508600001)(76116006)(33656002)(8936002)(38070700005)(122000001)(86362001)(5660300002)(66446008)(53546011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?p9quR49l5td2sbPcHH5baGACt0wdNcC7SckOgzWA0xiVCp9ZF0bipgRgvQzZ?= =?us-ascii?Q?7Ykzglal7RxOz4bNcPrAn4cSj6fosArtyrK3tzzl7WBiuM+0FWEIlGCEYsDC?= =?us-ascii?Q?JQxRkWUH1LjOfH9VFV8gGM7/SPiAFMiXfOU6qJwWbTibze+izt3ezomjscNF?= =?us-ascii?Q?qdjV+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rUI14G6odjUUF?= =?us-ascii?Q?UDnyFz51//sGt7UEteORyEYomQuwNK4VsiYtBMcQhREKr4bdRbBECDa/jskZ?= =?us-ascii?Q?jL1FHkfZlUHLyMbwTVMRldCIftaEDBAUr7WPlNOd4fHIEHiAN4ejQAG4aou9?= =?us-ascii?Q?B5EoXGqfL7p5siex32RYkCbLSdhgotlzaxpy6+cjB8J6GwBFQeekj+IEhU0d?= =?us-ascii?Q?051uxW4oERS8IH51rzPk5IlPZNHsM1ElqEPxl2U8isFC3q/KFhUD1OjUCR3p?= =?us-ascii?Q?SzZEMQVOpMLT7RRYzAUqflrDJlXdxGms2wbFCfe0xbVnujz2nLvEnM+YQLli?= =?us-ascii?Q?s2yE6OeTT++XHsGyQR5UP2oDtRBYrDtARG/bzrChjtWxbAeLihEc0BWyGyln?= =?us-ascii?Q?+7lGjIGShOWqQ86621zdxbjl47SJjVArVHcqY8jtqhErizIk+5oxNlG09+uW?= =?us-ascii?Q?DnkBhhjzTyRgn5VppGRX4ePsASkgQCx5ET8YExkMDANEWIN7vO5PdxI6klDX?= =?us-ascii?Q?Th70aTZalQbMN0dqT2IlBvYJC9EnG/AvJmG/eg2Xx/5E/rsViuZyUDSIgI3G?= =?us-ascii?Q?M1ot4PHMUzAwrKNa3LUgNDKn6ETSjlkjvsXfXj81uyzISpGqaCTO6I6Fb6KF?= =?us-ascii?Q?kpPgfrvg2sBrfuCUsy8fSl+BQU8=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA1PR18MB4661.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fae5bce-0676-43e9-5d8f-08d9eca262dc X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2022 14:34:03.6164 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HJ3M2CKmywiD463vsN2IaEO0nZO/rI4hzZNRSc+7ixoX1fSi6IcYERZw+Ib0DRPq9Z6IqrLUhZqvbxO5mex0bQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR18MB1123 X-Proofpoint-GUID: Hy52LEhHp_SDApA6OwDAYy6krsL4awDT X-Proofpoint-ORIG-GUID: Hy52LEhHp_SDApA6OwDAYy6krsL4awDT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-10_06,2022-02-09_01,2021-12-02_01 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 Hi Ciara, Minor nit inline. With that Series Acked-by: Anoob Joseph Thanks, Anoob > -----Original Message----- > From: Ciara Power > Sent: Thursday, February 10, 2022 7:32 PM > To: dev@dpdk.org > Cc: roy.fan.zhang@intel.com; Akhil Goyal ; Anoob Jose= ph > ; mdr@ashroe.eu; Ciara Power > ; Declan Doherty ; Ankur > Dwivedi ; Tejasree Kondoj ; > John Griffin ; Fiona Trahe ; > Deepak Kumar Jain > Subject: [EXT] [PATCH v5 2/5] crypto: use single buffer for asymmetric se= ssion >=20 > External Email >=20 > ---------------------------------------------------------------------- > Rather than using a session buffer that contains pointers to private > session data elsewhere, have a single session buffer. > This session is created for a driver ID, and the mempool element > contains space for the max session private data needed for any driver. >=20 > Signed-off-by: Ciara Power > Acked-by: Fan Zhang >=20 > --- > v5: > - Removed get API for session private data, can be accessed directly. > - Modified test application to create a session mempool for > TEST_NUM_SESSIONS rather than TEST_NUM_SESSIONS * 2. > - Reworded create session function description. > - Removed sess parameter from create session trace, > to be added in a later patch. > v4: > - Merged asym crypto session clear and free functions. > - Reordered some function parameters. > - Updated trace function for asym crypto session create. > - Fixed cnxk clear, the PMD no longer needs to put private data > back into a mempool. > - Renamed struct field for max private session size. > - Replaced __extension__ with RTE_STD_C11. > - Moved some parameter validity checks to before functional code. > - Reworded release note. > - Removed mempool parameter from session configure function. > - Removed docs code additions, these are included due to patch 1 > changing sample doc to use literal includes. > v3: > - Corrected formatting of struct comments. > - Increased size of max_priv_session_sz to uint16_t. > - Removed trace for asym session init function that was > previously removed. > - Added documentation. > v2: > - Renamed function typedef from "free" to "clear" as session private > data isn't being freed in that function. > - Moved user data API to separate patch. > - Minor fixes to comments, formatting, return values. > --- > app/test-crypto-perf/cperf_ops.c | 14 +- > app/test-crypto-perf/cperf_test_throughput.c | 8 +- > app/test/test_cryptodev_asym.c | 272 +++++-------------- > doc/guides/prog_guide/cryptodev_lib.rst | 21 +- > doc/guides/rel_notes/release_22_03.rst | 7 + > drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 8 +- > drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 8 +- > drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 22 +- > drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 3 +- > drivers/crypto/octeontx/otx_cryptodev_ops.c | 32 +-- > drivers/crypto/openssl/rte_openssl_pmd.c | 4 +- > drivers/crypto/openssl/rte_openssl_pmd_ops.c | 24 +- > drivers/crypto/qat/qat_asym.c | 54 +--- > drivers/crypto/qat/qat_asym.h | 5 +- > lib/cryptodev/cryptodev_pmd.h | 23 +- > lib/cryptodev/cryptodev_trace_points.c | 9 +- > lib/cryptodev/rte_cryptodev.c | 213 ++++++++------- > lib/cryptodev/rte_cryptodev.h | 97 ++++--- > lib/cryptodev/rte_cryptodev_trace.h | 38 ++- > lib/cryptodev/version.map | 7 +- > 20 files changed, 315 insertions(+), 554 deletions(-) >=20 [snip] > diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c > b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c > index a5fb68da02..72f5f1a6fe 100644 > --- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c > +++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c > @@ -658,10 +658,9 @@ void > cnxk_ae_session_clear(struct rte_cryptodev *dev, > struct rte_cryptodev_asym_session *sess) > { > - struct rte_mempool *sess_mp; > struct cnxk_ae_sess *priv; >=20 > - priv =3D get_asym_session_private_data(sess, dev->driver_id); > + priv =3D (struct cnxk_ae_sess *) sess->sess_private_data; > if (priv =3D=3D NULL) > return; >=20 > @@ -670,40 +669,29 @@ cnxk_ae_session_clear(struct rte_cryptodev *dev, >=20 > /* Reset and free object back to pool */ > memset(priv, 0, cnxk_ae_session_size_get(dev)); > - sess_mp =3D rte_mempool_from_obj(priv); > - set_asym_session_private_data(sess, dev->driver_id, NULL); > - rte_mempool_put(sess_mp, priv); > } >=20 > int > cnxk_ae_session_cfg(struct rte_cryptodev *dev, > struct rte_crypto_asym_xform *xform, > - struct rte_cryptodev_asym_session *sess, > - struct rte_mempool *pool) > + struct rte_cryptodev_asym_session *sess) > { > struct cnxk_cpt_vf *vf =3D dev->data->dev_private; > struct roc_cpt *roc_cpt =3D &vf->cpt; > - struct cnxk_ae_sess *priv; > + struct cnxk_ae_sess *priv =3D > + (struct cnxk_ae_sess *) sess->sess_private_data; [Anoob] Rest of the code in cnxk follows reverse xmas tree. May be, can you= move this up? Or may be just split declaration and assignment and you can = retain the existing order?