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 0A0A3A2EEB for ; Sat, 14 Sep 2019 17:06:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDA491C199; Sat, 14 Sep 2019 17:06:53 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id A2B971F040 for ; Fri, 13 Sep 2019 16:02:26 +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 x8DDtpaY012089; Fri, 13 Sep 2019 07:02:25 -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=m2wFUuJezyK5cgldhpIaA/9bbmaEOlTwK1DARrt2d+M=; b=bNQamOo4DGh/8Y/hhE922LDIAJpRmEqJVRo3EB/g3TboJ0WKV1BykzDFuO4+uVhIcvE/ QjnGzNJIl9HRVuMP+2NFUil5RCpQCHTOiRHFKkhgiCkIFqckXdZX46UFTAZpLSUOjqz5 8hQUSUxRuR+Dw7tt7OR3R27MYpkKX6gebY0UyVL3L41Qc44vnmBPX7RuAp7Ay0DJc0WL LmnYSILd/SSGy2hxp3QftFPabraeqEp0drtNdz0W1j8ZhO5/UtJJvYJ/BjcMVAh9t5Wq s/oMjnSiEwK1b3YTQpUwE8EM7DFQb1RiyjHdUK0Ql0/5cBvrS0vYqXgvM1zDbo+YOnc3 CQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2uytdfkvn0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 13 Sep 2019 07:02:25 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 13 Sep 2019 07:02:23 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (104.47.32.52) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 13 Sep 2019 07:02:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M9c3DVoVHQc4gIph7VLeRUEYhXFHmpqlu0t8fyaMfSwz2d0gQ2Lt1Jv9fMbbcugVnrTq3EN4uUL9dpABTvYVMQ4nRWBx/mK2tbt/wP+PvkIcFZXvJFm/4DmzJuDbnyJitzLSOO9TKlIRu5p+UaWvtIDM5QNdzuHtDvlVoV8akD9A5P1+SS4m+mkNid9O8hdrMuau9K4BraTawS1Ijuu6oWIV5TDTC1AXXTe+4/l8qFdPTzs05nl94+YK4RrA+QR6EzwTzUgubRhK9mkDdmQdWdwVCCn3wjZqzsaSjiwbfIFv2gmhmGTW0G8y2XjMi2tdslDWPl8XmFQEub5L04xFoA== 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=m2wFUuJezyK5cgldhpIaA/9bbmaEOlTwK1DARrt2d+M=; b=bCe3l+IQY4+StvIZSfaD1tfU7LB2B8JY/fkNZepaR5BcdQxjT9TlKVcg32kyhSLST37+xJpZf+gEhuR7eGgoFQuiD7kDaXIcIEwE1wxX+sqvjvSsi4cfAt3RfJum223gPzVnec6FuSDPcS/TMbocXMpagmIh6EH7tsEBUtHgBL2ykMEllK0hPs7pABph30Qw7c5iHFg71lsvly8WzCEvN13Dhf0aXr6wb4uCL2JPYuJFa57a53/jKxu5y9mqNfhhdREfhpIdj7KjZDN/aU4Kc683U/YS3FUXy71vLzpLdHtQ49/f+x+yP1aCSSb4eprAEXZy+WMfgC9Dcdxfa4pv5w== 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=m2wFUuJezyK5cgldhpIaA/9bbmaEOlTwK1DARrt2d+M=; b=J4n6RsXOXJVOSUJ8h5gwho7TQSF0ViMR+tj8+nkCfj16NvrASjEQjBUSboTaoZdhWt6RYGl2NBq3cr7oVntsPBtf5sH5QqKk5sc9kcj7f2HBpSbf7/kgb5pyF6Ga8szWeiHHE3t7Bl1XdThzlBTbROzcsbSByCO/H7vy3Is/A2s= Received: from MWHPR1801MB1998.namprd18.prod.outlook.com (10.164.205.23) by MWHPR1801MB1968.namprd18.prod.outlook.com (10.164.205.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.17; Fri, 13 Sep 2019 14:02:21 +0000 Received: from MWHPR1801MB1998.namprd18.prod.outlook.com ([fe80::b914:ee59:a9fa:89d7]) by MWHPR1801MB1998.namprd18.prod.outlook.com ([fe80::b914:ee59:a9fa:89d7%3]) with mapi id 15.20.2263.021; Fri, 13 Sep 2019 14:02:21 +0000 From: Sunila Sahu To: "Trahe, Fiona" , Anoob Joseph , Shally Verma , "Kusztal, ArkadiuszX" , Ayuj Verma , "akhil.goyal@nxp.com" CC: Kanaka Durga Kotamarthy , "dev@dpdk.org" Thread-Topic: [PATCH v1 0/2] declare crypto asym xform immutable Thread-Index: AQHVQf0VV8yVRS7stkC7KA5UOMeURKbZdlWAgAFE6YCAABJ3AIAAFSsAgAAWigCAAGzMAIAGGgEAgDuSnoCAAFPBgIABCGqAgABYuACACvJHxw== Date: Fri, 13 Sep 2019 14:02:20 +0000 Message-ID: References: <1563958317-480-1-git-send-email-ayverma@marvell.com> , <06EE24DD0B19E248B53F6DC8657831551B282E1B@hasmsx109.ger.corp.intel.com> <06EE24DD0B19E248B53F6DC8657831551B2975BD@hasmsx109.ger.corp.intel.com> , <348A99DA5F5B7549AA880327E580B4358980FFA6@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B4358980FFA6@IRSMSX101.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 20ff8b93-4573-46c8-4d28-08d73852feea x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(711020)(4605104)(1401327)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:MWHPR1801MB1968; x-ms-traffictypediagnostic: MWHPR1801MB1968: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0159AC2B97 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(346002)(376002)(366004)(136003)(396003)(189003)(199004)(53754006)(13464003)(186003)(66066001)(26005)(105004)(11346002)(53946003)(53936002)(236005)(446003)(5660300002)(6436002)(54896002)(6116002)(3846002)(9686003)(99286004)(110136005)(54906003)(6506007)(53546011)(55236004)(102836004)(76176011)(6246003)(2906002)(6512007)(316002)(19627405001)(256004)(14444005)(30864003)(71190400001)(71200400001)(86362001)(2501003)(52536014)(76116006)(66556008)(64756008)(66476007)(66446008)(66946007)(91956017)(74316002)(7736002)(486006)(476003)(33656002)(14454004)(8676002)(229853002)(4326008)(561944003)(81166006)(81156014)(8936002)(25786009)(6486002)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR1801MB1968; H:MWHPR1801MB1998.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: mLSyu7LueZGTOy0PhXbSpPUqcZindICemSg8ZVbLixjnL1xPtbBe5ujVVVzZpLgex3bChT4yREEB5mIN3z35r1SOf/B5Vmuf0zsEW2FLkBQw/Od6frn6W9R4YYNEfmIH32uILAcLs0e22JPeR96tCzQzvkn27XSsIkS81X6l2vbBIvP3ZLwYhYIWqzG/KmniAROB3PboDH51peeL0NGHE2BQ5iewT7OAfesdcyUKfhph9+HsJzM/vgX5v17jd5daiWKRq2BlWajyQfH9UotWV+7tqbvvhSLoQoDeIxC8+o56NEn3Y7cxkx8TB/zkwHh9gGSAy1Xqc472uw2Z4TaS8UsUR3II/zLoVfFcCttiynujsQLw9o/nRjyEBs/hJRSoC+TTZJLN9MeuvF9lFe4fJtRvP6leKIqsGdPojwTHvcE= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 20ff8b93-4573-46c8-4d28-08d73852feea X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Sep 2019 14:02:20.9377 (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: feboCjQbGtVeuuQx175CBw7kZ+a9FtNPLUjUnUPvc1Mha6hYU2brn84phbcS3u5Nl0XufEShgO4ZzKy1AwyamQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1801MB1968 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-13_06:2019-09-11,2019-09-13 signatures=0 X-Mailman-Approved-At: Sat, 14 Sep 2019 17:06:52 +0200 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] [PATCH v1 0/2] declare crypto asym xform immutable 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 Fiona, Anoob, Fiona, > Though above reasons are from a QAT perspective, they surely also apply t= o sw PMDs and > I'd guess they also apply to other hw devices - though would like feedbac= k if different. Declaring crypto asym xform immutable does save allocation and copy of key = data into OCTEON PMD during session configuration. But since hw requires a definitive alignment, xform data has to be copied f= or op enqueue. So in this case session-less implementation is beneficial. I think there is value in both the implementations depending on the PMD. Anoob, > Moreover, the same behavior could be > achieved with session-less, if we declare that the number of operations d= one is "few". Not necessarily the number of operations done here is "few". It entirely de= pends on key usage. If the key is ephemeral then your operation will be limited to a single tra= nsaction as in case of a key exchange mechanism. But for other operations as digital signature, the life-time of the session= is not limited to a single operation. Also, there can be different ops (public key or private key authentication)= with a single session. In that case, session implementation will have an advantage over sessionles= s. Thanks, Sunila ________________________________ From: Trahe, Fiona Sent: Friday, September 6, 2019 4:55 PM To: Anoob Joseph ; Shally Verma ; = Kusztal, ArkadiuszX ; Ayuj Verma ; akhil.goyal@nxp.com Cc: Sunila Sahu ; Kanaka Durga Kotamarthy ; dev@dpdk.org ; Trahe, Fiona Subject: [EXT] RE: [PATCH v1 0/2] declare crypto asym xform immutable Hi Anoob, Arek, Shally, The fundamental question here seems to be whether it's ok to specify the as= ymmetric xform to have different behaviour to the symmetric xform. In my opinion it is. At least in terms of our QuickAssist PMD and its use by symmetric and asymmetric applications I don't see any conflict with the xforms having dif= ferent characteristics. They are two different structures. For rte_crypto_sym_xform, there are 2, usually small, params - key and iv -= that need to be copied into the descriptor to be sent to the hardware, so a copy can't be avoided there= and it helps to get this copy out of the way during the session. This prep helps to make with-sessi= on symmetric more performant than session-less would be. And so I don't see any problem in an application re-using the sym_xforms as= you've described, and the API not constraining them to be immutable for the lifetime of the sessi= on. For asymmetric on the other hand the rte_crypto_asym_xform has from 2 to 7 = larger buffers set up by the application with input data to be used in the session. In QAT case, none of this data c= an be copied into the descriptor and so the PMD would have to alloc duplicate structs and buffers for all th= is data and all the associated meta-data (phys_addr ptrs) and copy it all, just to facilitate the applicat= ion freeing the xform. >From a performance perspective, these copies seem wasteful, especially for = an asymmetric session which is likely to have far fewer ops associate with = it than a symmetric session would. >From a memory mgmt point of view it increases the memory resources needed. >From a security perspective, minimising the copies of key data in memory is= preferable. And it seems like a reasonable constraint on the Application to not free th= e xform - there are very few if any fields set up in it that it could re-us= e, so the only advantage I can see is that it would need a smaller pool of = xforms if it could re-use them. Though above reasons are from a QAT perspective, they surely also apply to = sw PMDs and I'd guess they also apply to other hw devices - though would li= ke feedback if different. So I'm in favour of the API constraining the asym_xform and all its fields = to be immutable for the lifetime of the session. I get that this doesn't provide programmatic protection if an application i= gnores the API directive. If you can suggest a way to protect this programmatically, that would be be= tter, but even in the absence of this, I think it's worth doing and think it's reasonable for application developers to be expected t= o follow the API documentation. Fiona > -----Original Message----- > From: Anoob Joseph [mailto:anoobj@marvell.com] > Sent: Friday, September 6, 2019 7:08 AM > To: Shally Verma ; Kusztal, ArkadiuszX ; Ayuj > Verma ; akhil.goyal@nxp.com > Cc: Sunila Sahu ; Kanaka Durga Kotamarthy ; > dev@dpdk.org; Trahe, Fiona > Subject: RE: [PATCH v1 0/2] declare crypto asym xform immutable > > Hi Shally, Arek, > > I still think it's a bit too early to take a decision on this. 'xform' is= being used for symmetric operations > as well. Everywhere, 'xform' is treated as an input argument to PMD ops. = Making this change will > define 'xform' in a different way, and that will be applicable only for a= symmetric. I believe we can wait > till we have a PMD which will be able to fully leverage this. Moreover, t= he same behavior could be > achieved with session-less, if we declare that the number of operations d= one is "few". So my opinion > is to push for session-less now and if it comes that the session based op= eration with immutable fields > is superior to session-less model, we can purse this change then. > > Also, the main concern here is that the library will become more prone to= errors. Issues arising out of > this would be hard to debug. So if we make this change, we should make su= re there are no better > alternatives. > > Following is something, that we often do, > > xform.abc =3D 123 > sess1 =3D create_session(xform); > > xform.abc =3D 456; > sess2 =3D create_session(xform); > > do_operation(sess1, op1); > do_operation(sess2, op2); > > With the said change, the above could give bogus results and the code wou= ldn't look buggy until you > read the documentation (and understand the usage). > > Thanks, > Anoob > > From: Shally Verma > Sent: Thursday, September 5, 2019 7:52 PM > To: Kusztal, ArkadiuszX ; Ayuj Verma ; > Anoob Joseph ; akhil.goyal@nxp.com > Cc: Sunila Sahu ; Kanaka Durga Kotamarthy ; > dev@dpdk.org; Trahe, Fiona > Subject: RE: [PATCH v1 0/2] declare crypto asym xform immutable > > Hi Arek > > Anoob has to have go, no-go on this further. Regarding your question on s= essionless, have you > submitted POC for same? > > Thanks > Shally > > From: Kusztal, ArkadiuszX > Sent: Thursday, September 5, 2019 2:52 PM > To: Ayuj Verma ; Shally Verma ; Anoob > Joseph ; mailto:akhil.goyal@nxp.com > Cc: Sunila Sahu ; Kanaka Durga Kotamarthy > ; mailto:dev@dpdk.org; Trahe, Fiona > > Subject: RE: [PATCH v1 0/2] declare crypto asym xform immutable > > Hi all, > What is the state of this patch, is it intended for 19.11 release? > I would also propose to extend .rst comments to session-less case too lik= e in this thread below (with > [AK]). > Regards, > Arek > ________________________________________ > From: Kusztal, ArkadiuszX > Sent: 25 July 2019 19:57 > To: Shally Verma ; Anoob Joseph ; Ayuj > Verma ; mailto:akhil.goyal@nxp.com > Cc: Sunila Sahu ; Kanaka Durga Kotamarthy > ; mailto:dev@dpdk.org ; Trahe, Fiona > > Subject: RE: [PATCH v1 0/2] declare crypto asym xform immutable > > Hi All, > > > > > I believe there are couple of issues with this patch. > > > > > > > > Are these experimental APIs? I believe they were made stable this > > > > release and I'm not sure if it is a right practice to edit an API > > > > without deprecation notice after it is made stable. Especially now > > > > that RC2 is done. @Akhil, what is your take on this? > > > > [Shally] These are experimental still, hence no deprecation notice. > > > > We checked about it with Fiona, Akhil before. > > > > > > [Anoob] In the patch, the edited APIs doesn't have experimental tag. = I > > > leave it to Akhil's judgement on this. > > > > > > > > > > > I think, the approach here is wrong. If the lifetime of the session > > > > is expected to be only few packets, then session-less (which I > > > > believe is in the pipeline) would make more sense. > > > > [Shally] See my response further below on this. > > > > > > > > If the lifetime of the session is expected to be more than that, > > > > then having this feature/limitation would make application more > > > > complicated. Also, since one asymmetric session can hold both publi= c > > > > & private keys, the implicit assumption would be, the session can b= e > > > > used for multiple kinds of operations. This change is in > > > > contradiction with > > > that. > > > > [Shally] Why the contradiction here? There's no change in session > > > > usage from current version. Currently too, once keys are set on > > > > asymmetric session, they are used with multiple operations using > > > > that sessions, example - once RSA xform is set with keys, then one > > > > can perform sign/verify/enc/dec. So, I don't see any change in that > > > > notion with this proposal. All we are changing is, PMD which does > > > > not need to store keys in specific format (like openssl PMD), can > > > > just hold app buffer pointer till session-lifetime (eventually > > > > giving same effect as sessionless). It will help such PMDs to > > > > optimize their session setup time by > > > avoiding unnecessary memcpy of keys buffers. > > > > > > [Anoob] Contradiction is in the sense of what is a session. Here we > > > are saying one session can have SIGN & VERIFY, but the lifetime of > > > the session is assumed to be "short". > > [Shally] No. we only said, Session will only have keys (which is in xfo= rm) with > > which SIGN & VERIFY will be performed during enqueue. > > As long as there're operations to be performed using data set in sessio= n, > > session data should not be manipulated. > [AK] - we need to keep in mind that if we will copy user private key insi= de our internal structs, > It will be stored in two places in the same time, making it more vulnerab= le, that's why I have asked > about session lifetime. > At least we could inform user of this when PMD copy data internally. > Of course usually this data need to be copied anyway for op lifetime (bec= ause of some > padding/alignement requirements hw may have). > > > > > > > > > > > > > > But my major concern is how this can lead to accidental errors. > > > > Making the argument as const will mean the API won't edit its > > > > contents. But if there is a pointer in that (key happens to be a > > > > pointer inside the xform), having const for xform will not help. > > > > This is my understanding. Please correct me if I'm wrong. > > > > [Shally] This spec says " xform and its buffers remain constant" . > > > > So, intention is to state to apps that buffer passed to xform shoul= d > > > > be const in nature and that they should not modify it. > > > > > > [Anoob] The current change could break existing applications. And the > > > compiler will not be able to detect it. > > > > > [Shally] Application would need to be changed to make sure this criteri= a is > > met. We took care to check same in asym unit test app while proposing > > change. > > > > > > > > > > Also, I could have the xform allocated from stack (non const, > > > > regular local > > > > variable) and then call the session_init. Would compiler throw an > > > > issue in that case? I doubt so. > > > > > > > > void abc(const int t) > > > > { > > > > printf("%d\n", t); > > > > } > > > > > > > > void main() > > > > { > > > > int t =3D 0; > > > > abc(t); > > > > t =3D 2; > > > > abc(t); > > > > } > > > > > > > > To summarize, if this assumption is accepted, then compiler will no= t > > > > be able to ensure it. And to properly use it, application will have > > > > to be drafted differently. And when similar effect can be achieved > > > > by having session-less, this seems redundant. > > > > [Shally] Compiler may or may not warn on typecast error here. > > > > > > [Anoob] May or may not be? > > > > > [Shally] Yes. Depending on compiler version type or optimization level. > > Havent given try to all. > > [AK] Integers conversions are not good example as integers in C are gover= ned by different rules than > pointers. > In terms of this > - struct rte_crypto_asym_xform *xforms, > + const struct rte_crypto_asym_xform *xforms, > No compiler should complain about that as per spec: for any qualifier q, = a pointer to a non-q-qualified > type may be converted to a pointer to > the q-qualified version of the type. > We of course expect user will not change this data when there are still o= ps to be enqueued with this > xform. > [AK] - This note could be added to the session-less case. > [Ayuj] Yes, also can't do below : > const struct rte_crypto_asym_xform *xform; > struct rte_crypto_modex_xform *xfrm =3D &(xform= ->modex); > it should needs to be const for both which will ensure its sani= ty : > const struct rte_crypto_asym_xform *xform; > const struct rte_crypto_modex_xform *xfrm =3D &= (xform->modex); > > > > > > > That's why > > > > spec and documentation are put in place to ensure that application > > > > don't reuse them or destroy them once "xform and its buffers" are > > > > set on > > > session. > > > > And, same will need to be documented about xform for session-less > > > > usage as well. > > > > > > [Anoob] Can you describe how this is required in session-less? > > > > > [Shally] We don't know how every PMD might use them. So, it is safe to = mark > > xform and buffers immutable there too. > > So this is my thought but I have asked from POC for sessionless, as it = is > > proposal by Arek, am yet to get more feedback on that. > > > > > > Even there, we would ensure that application do not re-use or modif= y > > > > xform and its buffers until dequeue happen. So, practically I see, > > > > application would have to take of these cases in session-less as we= ll. > > > > > > > > Since in session-based case, xform are set on it than ops, so we're > > > > moving same definition on session. So for PMDs which support > > > > sessions-based implementations ( like ours) , believe it completely > > > > make sense to enable sessions to have sessionless effect. If we > > > > don't change spec to enable optimization, then we're making > > > > 1-approach slower than other. PMDs can adopt any approach more > > suitable to them. > > > > But spec could be made flexible to allow them to experiment with > > > > both approaches for performance. Else , PMDs will be forced to > > > > experiment around sessionless which may be eventually be an > > > > unnecessary overhead > > > for them. > > > > > > [Anoob] I get your intention on avoiding the memcpys. But the current > > > changes would make the spec more prone to errors. And if we think we > > > should improve the key handling done in both session & session-less, = I > > > would suggest not to rush with this change. We can keep the API > > > experimental and continue improving it to fix this issue for all PMDs= more > > cleanly. > > > > > [Shally] There's no rush. It is up and open for feedback. > > This change has an intent to optimize session setup time and since xfor= m > > data is not supposed to change once it is set on session. Only change > > proposed is, why not just use app buffers instead of redundant copy of = same > > into PMD buffer. > > if you see better suggestions , please provide. > > > > > > > > > > Thanks > > > > Shally > > > > > > > > So this change is NACK from my side. > > > > > > > > Thanks, > > > > Anoob > > > > > > > > From: Ayuj Verma > > > > Sent: Wednesday, July 24, 2019 2:23 PM > > > > To: mailto:akhil.goyal@nxp.com > > > > Cc: mailto:arkadiuszx.kusztal@intel.com; Shally Verma > > > > ; Sunila Sahu > > > > ; Kanaka Durga Kotamarthy > > > > ; Anoob > > > Joseph > > > > ; mailto:dev@dpdk.org; Fiona Trahe > > > > > > > > Subject: Re: [PATCH v1 0/2] declare crypto asym xform immutable > > > > > > > > +Fiona. > > > > ________________________________________ > > > > From: Ayuj Verma > > > > Sent: 24 July 2019 14:21:55 > > > > To: mailto:akhil.goyal@nxp.com > > > > Cc: mailto:arkadiuszx.kusztal@intel.com > > > > ; Shally Verma > > > > ; Sunila Sahu > > > > ; Kanaka Durga Kotamarthy > > > > ; Anoob > > > Joseph > > > > ; mailto:dev@dpdk.org > > > > ; Ayuj Verma > > > > Subject: [PATCH v1 0/2] declare crypto asym xform immutable > > > > > > > > Mark asym xform as immutable till lifetime of session. It will save > > > > session setup time for PMDs, which doesn't require any manipulation > > > > of xform data, by directly using these buffers. > > > > > > > > * Updated xform type in session init/configure > > > > API as constant. > > > > * Updated doc with proper transform description. > > > > * Updated openssl PMD with above changes. > > > > > > > > Ayuj Verma (2): > > > > lib/crypto: declare crypto asym xform immutable > > > > crypto/openssl: mark asym xform constant > > > > > > > > doc/guides/prog_guide/cryptodev_lib.rst | 10 ++++++++++ > > > > drivers/crypto/openssl/rte_openssl_pmd_ops.c | 8 ++++---- > > > > lib/librte_cryptodev/rte_cryptodev.c | 2 +- > > > > lib/librte_cryptodev/rte_cryptodev.h | 2 +- > > > > lib/librte_cryptodev/rte_cryptodev_pmd.h | 2 +- > > > > 5 files changed, 17 insertions(+), 7 deletions(-) > > > > > > > > -- > > > > 1.8.3.1