From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 606EC1C6DC for ; Fri, 13 Apr 2018 21:07:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Apr 2018 12:07:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,446,1517904000"; d="scan'208";a="50603592" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga002.jf.intel.com with ESMTP; 13 Apr 2018 12:07:13 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.155]) by IRSMSX104.ger.corp.intel.com ([169.254.5.171]) with mapi id 14.03.0319.002; Fri, 13 Apr 2018 20:07:12 +0100 From: "De Lara Guarch, Pablo" To: "Gujjar, Abhinandan S" , "Doherty, Declan" , "jerin.jacob@caviumnetworks.com" , "hemant.agrawal@nxp.com" , "akhil.goyal@nxp.com" , "dev@dpdk.org" CC: "Vangati, Narender" , "Rao, Nikhil" Thread-Topic: [dpdk-dev,v1,3/3] doc: update cryptodev documentation for set/get private data Thread-Index: AQHTy976rVG+O2pcxUKkImG80v3fK6P/GoUg Date: Fri, 13 Apr 2018 19:07:11 +0000 Message-ID: References: <1522823672-60023-1-git-send-email-abhinandan.gujjar@intel.com> In-Reply-To: <1522823672-60023-1-git-send-email-abhinandan.gujjar@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGYyMjkxZjYtNzY5ZS00MjhkLWFkMzUtMDBkZDdlNDc4NzU0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InJIUzhNSERabW1XaGtwZDQrK0NOR3RGSXR4RXZHaEdrUnNleUdcLzM0MXpBPSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 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] [dpdk-dev, v1, 3/3] doc: update cryptodev documentation for set/get private data 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: Fri, 13 Apr 2018 19:07:17 -0000 > -----Original Message----- > From: Gujjar, Abhinandan S > Sent: Wednesday, April 4, 2018 7:35 AM > To: De Lara Guarch, Pablo ; Doherty, Decl= an > ; jerin.jacob@caviumnetworks.com; > hemant.agrawal@nxp.com; akhil.goyal@nxp.com; dev@dpdk.org > Cc: Vangati, Narender ; Gujjar, Abhinandan S > ; Rao, Nikhil > Subject: [dpdk-dev,v1,3/3] doc: update cryptodev documentation for set/ge= t > private data Better to rewrite title to something shorter, like "doc: add private data i= nfo in crypto guide". >=20 > Signed-off-by: Abhinandan Gujjar > --- > doc/guides/prog_guide/cryptodev_lib.rst | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) >=20 > diff --git a/doc/guides/prog_guide/cryptodev_lib.rst > b/doc/guides/prog_guide/cryptodev_lib.rst > index 066fe2d..57b3f6e 100644 > --- a/doc/guides/prog_guide/cryptodev_lib.rst > +++ b/doc/guides/prog_guide/cryptodev_lib.rst > @@ -299,6 +299,32 @@ directly from the devices processed queue, and for > virtual device's from a enqueue call. >=20 >=20 > +Set/Get private data > +~~~~~~~~~~~~~~~~~~~~ I would change the title of this section to "Private data". > +For session-based operations, the set and get API provides a mechanism > +for an application to store and retrieve the private data information > +stored along with the rte_cryptodev_sym_session session. Change to "along with the crypto session". > + > +For example, suppose an application is submitting a > +rte_cryptodev_sym_session operation and wants to indicate private data I would reword this and not use "rte_cryptodev_sym_session operation", beca= use it means nothing. Better "submitting a crypto operation with a session associated". > +information is required to be used after completion of the > +rte_cryptodev_sym_session operation. In this case, the application can u= se the > set API to set the private data and retrieve it using get API. > + > +.. code-block:: c > + > + int rte_cryptodev_sym_session_set_private_data( > + struct rte_cryptodev_sym_session *sess, void *data, uint16_t > size); > + > + void * rte_cryptodev_sym_session_get_private_data( > + struct rte_cryptodev_sym_session *sess); > + > + > +For session-less mode, the private data information can be placed along > +with the ``struct rte_crypto_op``. The > +``rte_crypto_op::private_data_offset`` indicates the start of private > +data information. The offset is counted from the start of the rte_crypto= _op > including initialization vector (IV). Including other crypto information such as the IVs (since there can be an I= V also for authentication). Thanks, Pablo