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 72978A320B for ; Mon, 21 Oct 2019 12:44:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DD3541BDFD; Mon, 21 Oct 2019 12:44:27 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id CDF785681 for ; Mon, 21 Oct 2019 12:44:25 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2019 03:44:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,323,1566889200"; d="scan'208";a="398620968" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga006.fm.intel.com with ESMTP; 21 Oct 2019 03:44:23 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.76]) by IRSMSX153.ger.corp.intel.com ([169.254.9.119]) with mapi id 14.03.0439.000; Mon, 21 Oct 2019 11:44:22 +0100 From: "Trahe, Fiona" To: "Kusztal, ArkadiuszX" , Anoob Joseph , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , Shally Verma , "Trahe, Fiona" Thread-Topic: [dpdk-dev] [PATCH v4] cryptodev: extend api of asymmetric crypto by sessionless Thread-Index: AQHVfxzRT/34cfxmVkuCuF04fngzEKdTejAAgBF1V0A= Date: Mon, 21 Oct 2019 10:44:22 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435A2179ECD@IRSMSX101.ger.corp.intel.com> References: <20191009160848.15944-1-arkadiuszx.kusztal@intel.com> <06EE24DD0B19E248B53F6DC8657831551B2A0503@hasmsx109.ger.corp.intel.com> In-Reply-To: <06EE24DD0B19E248B53F6DC8657831551B2A0503@hasmsx109.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjdlMDkwNWEtZGY0Ni00MjE0LWJjMDAtYWFlOWYzZWJhNjI5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSWVIS1liNGlHYVU3VXhZSllBN05yVGtXamswOHhndXMxUlwvcGVQcFFuZzM5XC9tb3hLQjFMQjJ0a3JRMmJXT2d6In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4] cryptodev: extend api of asymmetric crypto by sessionless 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 Anoob, Akhil, I know this patch is already applied, and that's ok. Just want to update with my thoughts on terminology of sessionless vs sessi= on-less. Arek suggested below using session-less for all except C code, for consiste= ncy with Symmetric crypto. And has done in a few places in API and documentation.=20 However, Symmetric crypto has a mix of sessionless/Sessionless/session-less= /session_less. And sessionless is used for not just code but also feature flag matrix and performance tool command line options. So I propose we use sessionless in all places except the few that already h= ave session-less. I don't think it worth another asymmetric crypto API patch to change those. But we plan to use sessionless throughout the QAT asymmetric crypto PMD and= asymm test code. Fiona =20 > -----Original Message----- > From: Kusztal, ArkadiuszX > Sent: Thursday, October 10, 2019 9:28 AM > To: Anoob Joseph ; dev@dpdk.org > Cc: akhil.goyal@nxp.com; Trahe, Fiona ; Shally Ver= ma > > Subject: RE: [dpdk-dev] [PATCH v4] cryptodev: extend api of asymmetric cr= ypto by sessionless >=20 > Hi Anoob, >=20 > > -----Original Message----- > > From: Anoob Joseph [mailto:anoobj@marvell.com] > > Sent: Thursday, October 10, 2019 5:43 AM > > To: Kusztal, ArkadiuszX ; dev@dpdk.org > > Cc: akhil.goyal@nxp.com; Trahe, Fiona ; Shally > > Verma > > Subject: RE: [dpdk-dev] [PATCH v4] cryptodev: extend api of asymmetric > > crypto by sessionless > > > > Hi Arek, > > > > Shouldn't we update release notes also? > Yes, good point, I will update. > > > > Also a minor observation, what is the usage that we should stick to? > > "session-less" or "sessionless". I see that we use it interchangeably. > Yes, I think it would be good if could unify this. > Symmetric API states: > "Session-less API crypto operation parameters" > So we can stick to that in everything that is not C identifier I suppose. > I will send v5 then. > > > > Thanks, > > Anoob > > > > > -----Original Message----- > > > From: dev On Behalf Of Arek Kusztal > > > Sent: Wednesday, October 9, 2019 9:39 PM > > > To: dev@dpdk.org > > > Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Shally Verma > > > ; Anoob Joseph ; Arek > > Kusztal > > > > > > Subject: [dpdk-dev] [PATCH v4] cryptodev: extend api of asymmetric > > > crypto by sessionless > > > > > > This commit adds asymmetric session-less option to rte_crypto_asym_op= . > > > Feature flag for sessionless is added to rte_cryptodev. > > > > > > Signed-off-by: Arek Kusztal > > > --- > > > v2: > > > - added union > > > v3: > > > - added entry into feature matrix > > > - added information to prog_guide > > > v4: > > > - fixed formatting > > > - fixed grammar > > > > > > doc/guides/cryptodevs/features/default.ini | 1 + > > > doc/guides/prog_guide/cryptodev_lib.rst | 9 ++++++++- > > > lib/librte_cryptodev/rte_crypto_asym.h | 9 +++++++-- > > > lib/librte_cryptodev/rte_cryptodev.h | 2 ++ > > > 4 files changed, 18 insertions(+), 3 deletions(-) > > > > > > diff --git a/doc/guides/cryptodevs/features/default.ini > > > b/doc/guides/cryptodevs/features/default.ini > > > index d3ee1af..b7f9a0a 100644 > > > --- a/doc/guides/cryptodevs/features/default.ini > > > +++ b/doc/guides/cryptodevs/features/default.ini > > > @@ -26,6 +26,7 @@ OOP LB In LB Out =3D > > > RSA PRIV OP KEY EXP =3D > > > RSA PRIV OP KEY QT =3D > > > Digest encrypted =3D > > > +Asymmetric sessionless =3D > > > > > > ; > > > ; Supported crypto algorithms of a default crypto driver. > > > diff --git a/doc/guides/prog_guide/cryptodev_lib.rst > > > b/doc/guides/prog_guide/cryptodev_lib.rst > > > index 9719944..4584834 100644 > > > --- a/doc/guides/prog_guide/cryptodev_lib.rst > > > +++ b/doc/guides/prog_guide/cryptodev_lib.rst > > > @@ -876,7 +876,14 @@ private asymmetric session data. Once this is > > > done, session should be freed usin > > > > > > Asymmetric Sessionless Support > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > -Currently asymmetric crypto framework does not support sessionless. > > > +Asymmetric crypto framework supports sessionless operations. > > > + > > > +Fields that should be set by user are: > > > + > > > +Member xform of struct rte_crypto_asym_op should point to the user > > > created rte_crypto_asym_xform. > > > +Note that this rte_crypto_asym_xform should be immutable for the > > > lifetime of associated crypto_op. > > > + > > > +Member sess_type of rte_crypto_op should be set to > > > RTE_CRYPTO_OP_SESSIONLESS. > > > > > > Transforms and Transform Chaining > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > diff --git a/lib/librte_cryptodev/rte_crypto_asym.h > > > b/lib/librte_cryptodev/rte_crypto_asym.h > > > index 4fbef2f..0d34ce8 100644 > > > --- a/lib/librte_cryptodev/rte_crypto_asym.h > > > +++ b/lib/librte_cryptodev/rte_crypto_asym.h > > > @@ -522,8 +522,13 @@ struct rte_crypto_dsa_op_param { > > > * > > > */ > > > struct rte_crypto_asym_op { > > > - struct rte_cryptodev_asym_session *session; > > > - /**< Handle for the initialised session context */ > > > + RTE_STD_C11 > > > + union { > > > + struct rte_cryptodev_asym_session *session; > > > + /**< Handle for the initialised session context */ > > > + struct rte_crypto_asym_xform *xform; > > > + /**< Session-less API crypto operation parameters */ > > > + }; > > > > > > __extension__ > > > union { > > > diff --git a/lib/librte_cryptodev/rte_cryptodev.h > > > b/lib/librte_cryptodev/rte_cryptodev.h > > > index e175b83..c6ffa3b 100644 > > > --- a/lib/librte_cryptodev/rte_cryptodev.h > > > +++ b/lib/librte_cryptodev/rte_cryptodev.h > > > @@ -448,6 +448,8 @@ rte_cryptodev_asym_get_xform_enum(enum > > > rte_crypto_asym_xform_type *xform_enum, /**< Support RSA Private Key > > > OP with CRT (quintuple) Keys */ > > > #define RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED (1ULL << 19) > > > /**< Support encrypted-digest operations where digest is appended to > > > data */ > > > +#define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS (1ULL << 20) > > > +/**< Support asymmetric session-less operations */ > > > > > > > > > /** > > > -- > > > 2.1.0