From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 62C341BEC1 for ; Tue, 3 Jul 2018 16:12:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2018 07:12:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,303,1526367600"; d="scan'208";a="52319575" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga008.fm.intel.com with ESMTP; 03 Jul 2018 07:12:12 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.148]) by IRSMSX109.ger.corp.intel.com ([169.254.13.225]) with mapi id 14.03.0319.002; Tue, 3 Jul 2018 15:12:11 +0100 From: "Trahe, Fiona" To: Shally Verma , "De Lara Guarch, Pablo" CC: "akhil.goyal@nxp.com" , "dev@dpdk.org" , "pathreya@caviumnetworks.com" , Sunila Sahu , Ashish Gupta , "Trahe, Fiona" Thread-Topic: [PATCH v3 3/6] lib/cryptodev: add asymmetric crypto capability in cryptodev Thread-Index: AQHT7NwI3G9QITeTskWug3vzk3+ipqR9v5Zw Date: Tue, 3 Jul 2018 14:12:11 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435895BAB93@IRSMSX101.ger.corp.intel.com> References: <1526450713-17299-1-git-send-email-shally.verma@caviumnetworks.com> <1526450713-17299-4-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: <1526450713-17299-4-git-send-email-shally.verma@caviumnetworks.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzAzN2UzMGYtOTE1MC00ZDExLTkyZjMtYmVhZDAyMmNiNTdmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQWhET0RoWE9xa2lxK2NxTVd4N0l1bW1rZmpcL29YTEdhSE1oMzM5N2daMlZ3TUl1ZE1RYmQrUkMrbkV1SFFyeEgifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 3/6] lib/cryptodev: add asymmetric crypto capability in cryptodev 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: , X-List-Received-Date: Tue, 03 Jul 2018 14:12:14 -0000 Hi Shally, > -----Original Message----- > From: Shally Verma [mailto:shally.verma@caviumnetworks.com] > Sent: Wednesday, May 16, 2018 7:05 AM > To: De Lara Guarch, Pablo > Cc: Trahe, Fiona ; akhil.goyal@nxp.com; dev@dpdk.o= rg; > pathreya@caviumnetworks.com; Sunila Sahu = ; Ashish Gupta > > Subject: [PATCH v3 3/6] lib/cryptodev: add asymmetric crypto capability i= n cryptodev >=20 > Extend cryptodev with asymmetric capability APIs and > definitions. >=20 > changes from v2: > - remove redundant xform_type from asym capability struct > - rename rte_cryptodev_get_asym_xform_enum to > be more consistent with other API names >=20 > Signed-off-by: Shally Verma > Signed-off-by: Sunila Sahu > Signed-off-by: Ashish Gupta >=20 > --- //snip// > diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/= rte_cryptodev.h > index 623459a95..6c13d23f8 100644 > --- a/lib/librte_cryptodev/rte_cryptodev.h > +++ b/lib/librte_cryptodev/rte_cryptodev.h > @@ -178,6 +178,35 @@ struct rte_cryptodev_symmetric_capability { > }; > }; >=20 > +/** > + * Asymmetric Xform Crypto Capability > + * > + */ > +struct rte_cryptodev_asymmetric_xfrm_capability { > + enum rte_crypto_asym_xform_type xform_type; > + /**< Transform type: RSA/MODEXP/DH/DSA/MODINV */ > + > + uint32_t op_types; > + /**< bitmask for supported rte_crypto_asym_op_type */ > + > + __extension__ > + union { > + struct rte_crypto_param_range modlen; > + /**< Range of modulus length supported by modulus based xform. > + * Value 0 mean implementation default > + */ [Fiona] Some other fields may be necessary here, e.g. - A bitmask for supported RSA padding types - Whether RSA private-key in quintuple format is supported - Which hash-algorithms are supported if RSA padding =3D OAEP or PSS - whether xform chaining is supported for DH keypair gen These are not blockers for the first release, but are likely to be=20 needed before the experimental label is removed. > + }; > +}; > + > +/** > + * Asymmetric Crypto Capability > + * > + */ > +struct rte_cryptodev_asymmetric_capability { > + struct rte_cryptodev_asymmetric_xfrm_capability xfrm_capa; > +}; [Fiona] Why the extra indirection? Couldn't this be removed and the previous structure be=20 renamed rte_cryptodev_asymmetric_capability? //snip// > @@ -1164,7 +1265,7 @@ int __rte_experimental > rte_cryptodev_asym_session_set_private_data( [Fiona] I'd prefer to call this appl_data or appl_priv_data, I think the te= rm private_data is=20 over-used, sometimes means PMD data and sometimes means appl data. Btw- same is true of sym private_data - but changing that is out of scope f= or this patch =20 > struct rte_cryptodev_asym_session *sess, > void *data, > - uint16_t size) > + uint16_t size); >=20 > /** > * Get private data of a session. > @@ -1178,7 +1279,7 @@ rte_cryptodev_asym_session_set_private_data( > */ > void * __rte_experimental > rte_cryptodev_asym_session_get_private_data( > - struct rte_cryptodev_asym_session *sess) > + struct rte_cryptodev_asym_session *sess); >=20 >=20 > #ifdef __cplusplus > diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map > b/lib/librte_cryptodev/rte_cryptodev_version.map > index 62b782444..817cf9f70 100644 > --- a/lib/librte_cryptodev/rte_cryptodev_version.map > +++ b/lib/librte_cryptodev/rte_cryptodev_version.map > @@ -89,13 +89,18 @@ DPDK_17.11 { > EXPERIMENTAL { > global: >=20 > - rte_cryptodev_asym_get_private_session_size > + rte_cryptodev_asym_capability_get; > + rte_cryptodev_asym_get_private_session_size; > + rte_cryptodev_asym_get_xform_enum; > + rte_crypto_asym_op_strings; > rte_cryptodev_asym_session_clear; > rte_cryptodev_asym_session_create; > rte_cryptodev_asym_session_free; > rte_cryptodev_asym_session_init; > - rte_cryptodev_asym_session_get_private_data > - rte_cryptodev_asym_session_set_private_data > + rte_cryptodev_asym_session_get_private_data; > + rte_cryptodev_asym_session_set_private_data; > + rte_cryptodev_asym_xfrm_capability_check_optype; > + rte_crypto_asym_xform_strings; > rte_cryptodev_sym_session_get_private_data; > rte_cryptodev_sym_session_set_private_data; > } DPDK_17.11; > -- > 2.14.3