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 3891FA0471 for ; Thu, 18 Jul 2019 11:56:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 16E441DBF; Thu, 18 Jul 2019 11:56:26 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 0F7B31D9E for ; Thu, 18 Jul 2019 11:56:23 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6I9tFTi005941; Thu, 18 Jul 2019 02:56:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=pfpt0818; bh=mKVYxZvwk76nu2rnW/8mNnMdm5Jtrj73R5xoEMy9z2U=; b=JVnsxzAK4gzZgr90PI+fgQzGnalHNVtTXTUKNZjGSa3hiV2StfDAm/2GmvP1xT9oNc07 PJuc6iUUlDPs1uZ00I+So4uheJT8OpaUPFiR/8Q/CT9mKdh73E/TZpuKoChhYU3dutV5 6hUB5rwHtXgKrUa/6kH7+oLQJGBJm0qPR7zNktC5ijJKzvsEYFUympBigz/3NgN1pntV Q81ndFeAkz2Zo33lpkIeunyv0OIy+HjKGLAtu60esaqg1jiubJevfdHtahIqla05n7aH W3UrWsfFspjICTd/XVxY7IJdjtK1F+L0DE5nLk+aNB05nUCIzV1xIM5Ncl82cQP0MiF4 vQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2ts0a2bf2c-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 18 Jul 2019 02:56:23 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 18 Jul 2019 02:56:21 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (104.47.49.56) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 18 Jul 2019 02:56:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VpZVrQrsz6bTOy+uu0aJBVFGP+xLgxAsf0SXub4iJHtLMaLaKgQm+U4TooLyj4xUoXCTsQy0xY8cxdnZdg7ML++e6cA840dLwAtZrnDtjW+tTBJnDwdes/6LmSJ95rhJDVxPZd/KtBooQelB+A2VgKNgNvKfa2Ss7mqskCG522WU/EUvIDN0CNHMH7zr7WU8atkz5lJI18vgGs9qbnz1cElCZeAMOFsVYeg4FEpscQ6YXTVBX86yyYkkK0nCNs3WmUyxM8GADpuz+fuJNjF+GIxCLiDM8cUEUyK4x2eDOx7fvd44SEsmyYB3KqLyUV2Niiv/60sCciSMXyazZLpZiQ== 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=mKVYxZvwk76nu2rnW/8mNnMdm5Jtrj73R5xoEMy9z2U=; b=a5/CWv3mVTdths8XdJ8hDar9SlRQt/GNfuZjJfRPXOEZXSMgVXSXOA1cWEBrzHN4phJ22RcndiwgWtAvG5l5Ak0NZ+Pst00LwCk4bVZ/opq/pI/jWBi96Tv4HytPj6eHQPdrqX1/kTn8b8JkZJkFfZRsNwPprLgZvMHxnup2la69HAsLBMcalKcQskpKncF46bfde7uH4SOx1E6k+yk2Ox0sA//sCEgIDxn9Qgr7QyWV0/wuydGw8pYZi5Ijyu3lefTOSjnhoaKYBZ0Uk939yXpVDacr4FuOlDl6dMbSskJ1BnRaJmGX571lONO0AkbHI1EeZYnnfxQia7IuFxbq4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=marvell.com;dmarc=pass action=none header.from=marvell.com;dkim=pass header.d=marvell.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mKVYxZvwk76nu2rnW/8mNnMdm5Jtrj73R5xoEMy9z2U=; b=jEIQBBkgpAlmtpNglJbuN0zV9azoEUExmX/RMBMihVIB8TZPwlsx8kPfwWL7/1GIzbqRqpk1WfXXsIlmcNNPLFALTein5HI6ffbm/tm2RUse0b2qX5mPx+F1RlLjvv1iFNss6/bs0xgcaGA2paY2wO7GeoevRh2Jpo2qp/Xkx9A= Received: from MN2PR18MB2542.namprd18.prod.outlook.com (20.179.82.221) by MN2PR18MB3389.namprd18.prod.outlook.com (10.255.238.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.10; Thu, 18 Jul 2019 09:56:19 +0000 Received: from MN2PR18MB2542.namprd18.prod.outlook.com ([fe80::74b0:9895:ebeb:2e03]) by MN2PR18MB2542.namprd18.prod.outlook.com ([fe80::74b0:9895:ebeb:2e03%3]) with mapi id 15.20.2073.012; Thu, 18 Jul 2019 09:56:19 +0000 From: Ayuj Verma To: "Kusztal, ArkadiuszX" , "Trahe, Fiona" , "akhil.goyal@nxp.com" CC: Shally Verma , Sunila Sahu , Kanaka Durga Kotamarthy , "dev@dpdk.org" Thread-Topic: [RFC] lib/crypto: mark asym session-buffer non-reuseable Thread-Index: AQHVPJv3QiCtmqeltUe+MNvea06B4abO16IAgAACBICAAUrhpQ== Date: Thu, 18 Jul 2019 09:56:18 +0000 Message-ID: References: <1563366852-23118-1-git-send-email-ayverma@marvell.com> <1563366852-23118-2-git-send-email-ayverma@marvell.com> <348A99DA5F5B7549AA880327E580B435897C6583@IRSMSX101.ger.corp.intel.com>, <06EE24DD0B19E248B53F6DC8657831551B280B26@hasmsx109.ger.corp.intel.com> In-Reply-To: <06EE24DD0B19E248B53F6DC8657831551B280B26@hasmsx109.ger.corp.intel.com> Accept-Language: en-IN, en-US Content-Language: en-IN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [106.51.233.114] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: be77ae6e-0e44-457f-26e3-08d70b662e78 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MN2PR18MB3389; x-ms-traffictypediagnostic: MN2PR18MB3389: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01026E1310 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39830400003)(376002)(136003)(366004)(346002)(396003)(199004)(189003)(13464003)(2906002)(52536014)(64756008)(229853002)(25786009)(68736007)(99286004)(11346002)(71190400001)(74316002)(6606003)(102836004)(76116006)(14444005)(66476007)(66556008)(86362001)(476003)(486006)(4326008)(186003)(6436002)(236005)(110136005)(5660300002)(54896002)(9686003)(55016002)(316002)(6246003)(53936002)(53546011)(81166006)(66066001)(66446008)(78486014)(5024004)(256004)(8676002)(9456002)(478600001)(81156014)(7696005)(7736002)(71200400001)(76176011)(26005)(6116002)(3846002)(66946007)(2501003)(19627405001)(8936002)(446003)(14454004)(54906003)(6506007)(55236004)(33656002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB3389; H:MN2PR18MB2542.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 5QXjtMsPiaGP+8Zyw6zZfqZeKJQVENp6L4SDEk1h23RBuA27yeOnNwikAHve+jrRodxC/t8w60rU+XYUQOsfDV67Vjs3ozKGcDBmZZUNQqaYkh0J6Nr/idqEYoxNEB+Arr27WdvFl3KnEdLb1wNmKzkoJ5VAQOf4sf6iiUc+1XewY8Q/GTJz+G5UwaJZiWg5+spm1bgBoclCu74CtH8ZXqKDW1szusfcfoL2M47L3cIL8k7J/SRaEaZ1hmMzfA6qtx9jeMi+FUulnk4Fy+8+Rgn8ZWOqavtyiSfCvwvnJIrG+PJ4qP+zYjpVhHJMO11uHGLryNeudl9o3wSoXip64SYswViDLgeGXAZCG6zSsVjcNNMl173DyiT6P3lKLZKhr+TKaKmFR1Ny1zROz2TFXuoPPYcequjh5ki3AdFNTLI= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: be77ae6e-0e44-457f-26e3-08d70b662e78 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jul 2019 09:56:18.8221 (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: ayverma@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3389 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-18_05:2019-07-18,2019-07-18 signatures=0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [RFC] lib/crypto: mark asym session-buffer non-reuseable 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 Arek, Fiona Please see in-line. Thanks and regards Ayuj Verma ________________________________ From: Kusztal, ArkadiuszX Sent: 17 July 2019 19:40 To: Trahe, Fiona; Ayuj Verma; akhil.goyal@nxp.com Cc: Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; dev@dpdk.org Subject: RE: [RFC] lib/crypto: mark asym session-buffer non-reuseable > -----Original Message----- > From: Trahe, Fiona > Sent: Wednesday, July 17, 2019 4:04 PM > To: Ayuj Verma ; akhil.goyal@nxp.com > Cc: Kusztal, ArkadiuszX ; > shallyv@marvell.com; ssahu@marvell.com; kkotamarthy@marvell.com; > dev@dpdk.org; Trahe, Fiona > Subject: RE: [RFC] lib/crypto: mark asym session-buffer non-reuseable > > Hi Ayuj, > > > -----Original Message----- > > From: Ayuj Verma [mailto:ayverma@marvell.com] > > Sent: Wednesday, July 17, 2019 1:34 PM > > To: akhil.goyal@nxp.com > > Cc: Kusztal, ArkadiuszX ; Trahe, Fiona > > ; shallyv@marvell.com; ssahu@marvell.com; > > kkotamarthy@marvell.com; dev@dpdk.org; Ayuj Verma > > > > Subject: [RFC] lib/crypto: mark asym session-buffer non-reuseable > > > > Update asym xform usage in cryptodev documentation. > > > > Xform are immutable, non-reuseable entity till life time of session. > > This allow some PMD to optimize session setup time. > > > > Signed-off-by: Ayuj Verma > > Signed-off-by: Shally Verma > > --- > > doc/guides/prog_guide/cryptodev_lib.rst | 6 ++++++ > > lib/librte_cryptodev/rte_cryptodev_pmd.h | 2 +- > > 2 files changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/doc/guides/prog_guide/cryptodev_lib.rst > > b/doc/guides/prog_guide/cryptodev_lib.rst > > index 9719944..c97a239 100644 > > --- a/doc/guides/prog_guide/cryptodev_lib.rst > > +++ b/doc/guides/prog_guide/cryptodev_lib.rst > > @@ -894,6 +894,12 @@ asymmetric crypto chaining is Diffie-Hellman > > private key generation followed by public generation. Also, currently > > API does not support chaining of symmetric and asymmetric crypto > > xforms. > > > > +Transform is attached to session during asym session initialization > > +and can't be modified during session configuration. It remains > > +constant till the end of life > [Fiona] I agree with the intent of the RFC. And suggest being more explic= it > and saying "It and all the data buffers it points to should remain consta= nt..." [AK] I agree with RFC and Fiona :). [Ayuj] ACK. will submit a v2. > > > +span of a session. It should be used as it is in PMD, PMDs which > > +requires modification of these immutable data should internally do > > +memcpy of data and perform required operations. > [Fiona] for security I suggest adding here "It's the PMDs responsibility = to > ensure that any private data copied to local PMD storage is not stored by= the > PMD for longer than the session lifetime. > > > Each xform defines specific asymmetric crypto algo. Currently supporte= d > are: > > * RSA > > * Modular operations (Exponentiation and Inverse) diff --git > > a/lib/librte_cryptodev/rte_cryptodev_pmd.h > > b/lib/librte_cryptodev/rte_cryptodev_pmd.h > > index defe05e..1f083ea 100644 > > --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h > > +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h > > @@ -290,7 +290,7 @@ typedef int > (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev, > > * - Returns -ENOMEM if the private session could not be allocated. > > */ > > typedef int (*cryptodev_asym_configure_session_t)(struct rte_cryptodev > *dev, > > - struct rte_crypto_asym_xform *xform, > > + const struct rte_crypto_asym_xform *xform, > > struct rte_cryptodev_asym_session *session, > > struct rte_mempool *mp); > > /** > > -- > > 1.8.3.1