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 1EAF0A3160 for ; Wed, 9 Oct 2019 12:54:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 458281D483; Wed, 9 Oct 2019 12:54:55 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140079.outbound.protection.outlook.com [40.107.14.79]) by dpdk.org (Postfix) with ESMTP id 39C061C1F1 for ; Wed, 9 Oct 2019 12:54:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MDieLPA+WZ5aMy3m6GGfkjuPr9rD0fcx5gBMwjzfTSXcvdVLI8q5ezgA0hEsgUOu6wnwcDORRBMh6r7zZlSKo7EmDDh7LAaFQuCLIE3UBwEKfksoAvbBePN5o1rEABqjog7hiea+pISdiUT3kbtJbGTJVYtsM6t+pnqrO/Xg4S7A5IOj93hcKL0EElJlhxqEOMld6gF/6SHPZQiu9w1+6uLuVpfsCw1YpI9U6ZMP/uwza3v9XZBd1BQ3Ljaq+RX7WRn/f1fgeBl4wQOAMwY1U6IG4CovQsPk1hN3wxwJbdxEpRawWZuJp9gfdXist5aTO06Lgd/SGSvzlQSE8GfPvw== 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=mNuZcY9lwxsuWuEBsA1zXCzC8otQcRG2LUZ857Q8bjM=; b=beqc1pHZyfUsjVfZibLT8I2Zh7rvJBGjufZjN4dV3Ubja30Oesi73Wo9aseF1A8ezve7d+byOUCYjSilGmw/WehX6qVm8JvnnJt3SFALZV8G/B/WRsv/RNv4KLYJ+42ulIbBDJGbSUPeeoU2Y2mXeHxyRDZXx4CL7DyGlEuAo1ekwCV9jmTu//5POoT4vVyma4GJ7P8M+x8dZiDQuvPR2pQ0bKLU7SqOIn+O3dNdkefQ/SNX7tduMzllPsFIbThn6hCoL9Mzc3z4gmkOgWqIq7riYM+zCZ9MnLHl/7okTro7MQXhkupfgb5sxC3FzWmkf/HJHvMg5Dva+yJAFmKZ0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mNuZcY9lwxsuWuEBsA1zXCzC8otQcRG2LUZ857Q8bjM=; b=Qa8yoD/1e8IIzL/QMaSoOCW+eTmssgBrB0KLVGyRu3ZeZygICZ+b4dXkR+1ZLcBygJu11idfrVXkeoj1jPL2w51PdR21QNv6RgMrFgpp1eTi/nPpz9EYb/aMCcPtZYpQ7LsqJoU0ZyTLkd/ynv/1IJPHH//C3qnNK9c1MdhOLE0= Received: from VE1PR04MB6639.eurprd04.prod.outlook.com (10.255.118.11) by VE1PR04MB6525.eurprd04.prod.outlook.com (20.179.233.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.16; Wed, 9 Oct 2019 10:54:52 +0000 Received: from VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::c045:5df2:ba1f:c3ee]) by VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::c045:5df2:ba1f:c3ee%5]) with mapi id 15.20.2327.026; Wed, 9 Oct 2019 10:54:52 +0000 From: Akhil Goyal To: "Kusztal, ArkadiuszX" , "dev@dpdk.org" CC: "Trahe, Fiona" , "shallyv@marvell.com" , "anoobj@marvell.com" Thread-Topic: [PATCH v3] cryptodev: extend api of asymmetric crypto by sessionless Thread-Index: AQHVfnwtGSzMxhLwCk2hPspKLrKXA6dSIC4AgAACTxA= Date: Wed, 9 Oct 2019 10:54:52 +0000 Message-ID: References: <20191009083255.8804-1-arkadiuszx.kusztal@intel.com> <06EE24DD0B19E248B53F6DC8657831551B2A0014@hasmsx109.ger.corp.intel.com> In-Reply-To: <06EE24DD0B19E248B53F6DC8657831551B2A0014@hasmsx109.ger.corp.intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [92.120.1.65] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 870b81e7-1deb-480f-e5f9-08d74ca71cdf x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: VE1PR04MB6525: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:352; x-forefront-prvs: 018577E36E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(396003)(366004)(136003)(39860400002)(376002)(13464003)(199004)(189003)(102836004)(53546011)(478600001)(9686003)(33656002)(2906002)(446003)(99286004)(2501003)(26005)(6506007)(11346002)(71200400001)(71190400001)(186003)(5660300002)(44832011)(316002)(110136005)(476003)(486006)(54906003)(7736002)(6436002)(66066001)(25786009)(74316002)(8936002)(55016002)(81156014)(81166006)(52536014)(305945005)(6246003)(76176011)(7696005)(6116002)(256004)(3846002)(76116006)(66946007)(229853002)(66476007)(14454004)(86362001)(66556008)(8676002)(4326008)(66446008)(64756008); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6525; H:VE1PR04MB6639.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gX/jqRf1hCpyCQwaq17LArcM1pWxvNCaTpttRWkYQqHk/jwEu4f9Tu4t97DCW9GiOJYUat690mKkGo1EWRWRsaaq1LCpp5OusXmVaF3oRx3J4ldv41h2FVzSOv9AowY56k9D5GVHBFZj0tOIF18BNjrg/blLOn88cyhMbnvgT14cUmbzDaRYVAErWzRiqMXjGXn5MtMVAh2Bgl6s+7dXAsDND7P86xbUFepXfDNKb0dDVpz6BUP4OjfSeEtr1jnSNe7aXq/sNmyhChCzAMC979ovEGse+jvklCDgB5kduy9QQVcYpH+kETZQX/avHd3EzUvh1BdN2yNM7ffe3A7qnBMWre6acMhCEHVJca74NekfS2vssgXxw33wl9l4BYVqUPeIsK+mzfha2619C5xaAUMq314OXTFe5jhFHnVtxdY= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 870b81e7-1deb-480f-e5f9-08d74ca71cdf X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2019 10:54:52.2520 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: T+7JN32ehGEkyfmi22a+8R5iGKPQQz8v/5LWk+PUhlq5tW8d/ryRE3/O6DRabIANL2/4osXPGBN/bv5PD0gGfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6525 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" >=20 > Hi Akhil, >=20 > I will send v4 as I will change a little bit formatting in documentation. >=20 > > -----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 > > > > 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 > > > > 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(-) > > > > 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..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 > > > > Asymmetric Sessionless Support > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > -Currently asymmetric crypto framework does not support sessionless. > > +Asymmetric crypto framework support sessionless operations. Please re-phrase this section properly as well. > > + > > +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. > > > > 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 d= ata > > */ > > +#define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS (1ULL << 20) > > +/**< Support asymmetric session-less operations */ > > > > > > /** > > -- > > 2.1.0