From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AEDDC76191 for ; Thu, 18 Jul 2019 10:49:52 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 8E4D221783 for ; Thu, 18 Jul 2019 10:49:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="IA1buIIJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=marvell.onmicrosoft.com header.i=@marvell.onmicrosoft.com header.b="Tdp5VyZO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E4D221783 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=marvell.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F9181DBF; Thu, 18 Jul 2019 12:49:50 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 8C73E1D9E for ; Thu, 18 Jul 2019 12:49:48 +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 x6IAj5mo020057; Thu, 18 Jul 2019 03:49:47 -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=a43/m5KP93vbFyTS2eO0rZwF1NZn1I1NzbRy0ugX1HM=; b=IA1buIIJIsSxuUpqnY9hhwX3h6WWW8HF0Bhl2/6HcvR9qjZXVpVnRQ71BTtNbazfF91H WNTrIy1evSSCUfXCzrH1M+zD83p2RpNCTFSPZv9t4aa+hkHeFvj8VhWAybd71iIvnSYw zaPWqnfV9qSHl9sPQ9mvXRnZOtyzNopkT1VgAkgM0GD8z5Lq/i7i61YKeEL7p6mqqLEb nQqou+q+hnFI8yM11fHsdih14Gz+Rja4l6SBM1qWAGAAzJ833ENKIJMbViVfow1rKnXG PbCMvrhnYIQfXR695mlvuLc3WAnYGUNkrsFtvlbWMNHCfT3YBeyzlXwkCz3zLwqQbIQY kQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2ts0a2bkrs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 18 Jul 2019 03:49:45 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 18 Jul 2019 03:49:43 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (104.47.32.52) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 18 Jul 2019 03:49:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UL05yLzBa4BywFTjZ0VVGwky5CmKc+ZWp7SE0AzD5JJH4GO+D9bGhNFt1pgHC6hW8onY9KUfegzx5Hrzy5SLadcheBsZJK9grsboNK/WjbyuY3aDPBuq+8/bYJEu2Kg0cGv3tIJaTYfYFHbb6TsvR4Qucr64IYbS6oi1KpWMQ+HLhj3erKb9QeXoXruP/VfXXlO9efJQ/TLox7CTMI5QMsapkjPsKp6NfvkFeaFR3B4X/nM4k4bEUmFpxynB3vpTdX+0YSZrxbMjWoVeyY8nusVHOuBspc247R0R61kqS5A2yud5JntECaUnGhSicsiAhJSahFPeHaCpFO1hcXrE+w== 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=a43/m5KP93vbFyTS2eO0rZwF1NZn1I1NzbRy0ugX1HM=; b=SE1eIgn29LvaTOs1jE+6/SSbGJbtwbSdzf9I4rrOgGMUg7sCiFQiCnKqc3z5L0Z8ONKWYh0xLWTmSKd0hWaw/yW0uCJjnbf5FcbO7wqX84CLUVTmgZn3JH2YPZYwLWuVGz+naP3wp0e46Be6neQYn/IoXRCjqx0+HBuu5M0iv2bOgyilSGbB/URJQ/cCLu5tZ3uEU+2+rEWhv1bCimoatI0+jk0w/WfzqBa0OrplgmO5YEckcP/oyLZJbE/dyxXltZBSeXfo+N8oAMSwRDpXoG7rInjURyD8Qrjyxho6+LysS07OREXFOa0kli122g/7RpoxEgYs/3l5oKabhdYAVg== 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=a43/m5KP93vbFyTS2eO0rZwF1NZn1I1NzbRy0ugX1HM=; b=Tdp5VyZOz4cAElSH3gVc1to2/lkGWFkIepP7jrY2uEfqUcHy5a4o0Aa+qhidUPzZ/lTgNRv29VQT+FGxKTfY622PTQHshJw6CkJS9VKUXAvEbi2u+QRKsAOlBSQDOoVibhav6iCqDvfxGgoRY4kXk46t0QiKWGB4eBoLZHttqQc= Received: from MN2PR18MB2542.namprd18.prod.outlook.com (20.179.82.221) by MN2PR18MB3054.namprd18.prod.outlook.com (20.179.23.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.11; Thu, 18 Jul 2019 10:49:42 +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 10:49:41 +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+MNvea06B4abO16IAgAACBICAAUrhpYAADWXy Date: Thu, 18 Jul 2019 10:49:41 +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: 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: 70c793b2-1362-41a2-0fff-08d70b6da372 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:MN2PR18MB3054; x-ms-traffictypediagnostic: MN2PR18MB3054: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01026E1310 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39850400004)(346002)(376002)(366004)(136003)(396003)(199004)(13464003)(189003)(9456002)(6506007)(19627405001)(53546011)(64756008)(55236004)(2906002)(71190400001)(6246003)(102836004)(71200400001)(26005)(66476007)(66556008)(74316002)(66446008)(25786009)(236005)(53936002)(33656002)(81166006)(66946007)(186003)(11346002)(9686003)(14454004)(229853002)(476003)(6436002)(55016002)(86362001)(486006)(478600001)(52536014)(8676002)(6606003)(8936002)(7736002)(446003)(68736007)(6116002)(78486014)(4326008)(316002)(3846002)(5660300002)(54896002)(76176011)(66066001)(110136005)(2501003)(99286004)(54906003)(81156014)(14444005)(2940100002)(256004)(5024004)(76116006)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB3054; 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: VzUAGK3SpgGk7M7AZYXol+fI1LZa8Ups9HL3beToJ1l5bn9Zj5peeu7EP3bBGJH/c7Xuvvj2wCG66ig7KT5Icbhfs5XUUM7Cu8+fCkyM3l+rw0UFWXD54eAprjGRSsPtJ/Ls4SNAZMjiBFaW18+k9dhWs1ZFP5Lw40vqkUCBP+maz5fMnPlFRK2azF0jVdxZxm7QqRm8GWs4pBKD/QSmm9NJVvIQjLD6l+cLNTpjQgOfsnvJrHc5sqR7G5Wf4jQVoB5aaDx1K2VPL3CaEaq8/3Avyha7myvhiLBuWWYj80+c9mkQN0JKzOGZf5t09SGUFsUwt6kmXxaDlzVEX6/bm9nd4J33guA8jYQNvzOoF5fdX+MygWPcHaO7Di+v9JNqNA57kbIt1U+Xgxum24wd1fRwmBWG21wCnY1qkfbczNo= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 70c793b2-1362-41a2-0fff-08d70b6da372 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jul 2019 10:49:41.6017 (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: MN2PR18MB3054 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, > [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. >> Correction: Will incorporate this in Patch v1. Thanks and regards Ayuj Verma ________________________________ From: Ayuj Verma Sent: 18 July 2019 15:26 To: Kusztal, ArkadiuszX; Trahe, Fiona; 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 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