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 989C6A3160 for ; Wed, 9 Oct 2019 12:44:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6DEBA1D444; Wed, 9 Oct 2019 12:44:57 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 4CD501D444 for ; Wed, 9 Oct 2019 12:44:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 03:44:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,273,1566889200"; d="scan'208";a="196884281" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 09 Oct 2019 03:44:54 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 9 Oct 2019 03:44:54 -0700 Received: from lcsmsx156.ger.corp.intel.com (10.186.165.234) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 9 Oct 2019 03:44:54 -0700 Received: from HASMSX109.ger.corp.intel.com ([169.254.3.38]) by LCSMSX156.ger.corp.intel.com ([169.254.15.242]) with mapi id 14.03.0439.000; Wed, 9 Oct 2019 13:44:51 +0300 From: "Kusztal, ArkadiuszX" To: "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "Trahe, Fiona" , "shallyv@marvell.com" , "anoobj@marvell.com" Thread-Topic: [PATCH v3] cryptodev: extend api of asymmetric crypto by sessionless Thread-Index: AQHVfnw0ckZ43IDGHUa5S5MqfXZs46dSH97g Date: Wed, 9 Oct 2019 10:44:50 +0000 Message-ID: <06EE24DD0B19E248B53F6DC8657831551B2A0014@hasmsx109.ger.corp.intel.com> References: <20191009083255.8804-1-arkadiuszx.kusztal@intel.com> In-Reply-To: <20191009083255.8804-1-arkadiuszx.kusztal@intel.com> Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.184.70.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] 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 Akhil, I will send v4 as I will change a little bit formatting in documentation. > -----Original Message----- > From: Kusztal, ArkadiuszX > Sent: Wednesday, October 9, 2019 10:33 AM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; Trahe, Fiona ; > shallyv@marvell.com; anoobj@marvell.com; Kusztal, ArkadiuszX > > Subject: [PATCH v3] cryptodev: extend api of asymmetric crypto by > sessionless >=20 > This commit adds asymmetric session-less option to rte_crypto_asym_op. > Feature flag for sessionless is added to rte_cryptodev. >=20 > Signed-off-by: Arek Kusztal > --- > v2: > - added union > v3: > - added entry into feature matrix > - added information to prog_guide >=20 > doc/guides/cryptodevs/features/default.ini | 1 + > doc/guides/prog_guide/cryptodev_lib.rst | 8 +++++++- > lib/librte_cryptodev/rte_crypto_asym.h | 9 +++++++-- > lib/librte_cryptodev/rte_cryptodev.h | 2 ++ > 4 files changed, 17 insertions(+), 3 deletions(-) >=20 > 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 >=20 > ; > ; 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..9ecb322 100644 > --- a/doc/guides/prog_guide/cryptodev_lib.rst > +++ b/doc/guides/prog_guide/cryptodev_lib.rst > @@ -876,7 +876,13 @@ private asymmetric session data. Once this is done, > session should be freed usin >=20 > Asymmetric Sessionless Support > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > -Currently asymmetric crypto framework does not support sessionless. > +Asymmetric crypto framework support sessionless operations. > + > +Fields that should be set by user are: > +- rte_crypto_asym_xform *xform member of struct rte_crypto_asym_op > +should point to the asymmetric crypto xform. Note that this xform > +should be immutable for the lifetime of associated crypto_op. > +- uint8_t sess_type member of rte_crypto_op should be set to > RTE_CRYPTO_OP_SESSIONLESS. >=20 > 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 */ > + }; >=20 > __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 dat= a > */ > +#define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS (1ULL << 20) > +/**< Support asymmetric session-less operations */ >=20 >=20 > /** > -- > 2.1.0