[dpdk-dev,v3,3/3] doc: add private data info in crypto guide

Message ID 1523861696-103397-3-git-send-email-abhinandan.gujjar@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Gujjar, Abhinandan S April 16, 2018, 6:54 a.m. UTC
  Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/prog_guide/cryptodev_lib.rst | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
  

Comments

Akhil Goyal April 16, 2018, 9:16 a.m. UTC | #1
Hi Abhinandan,

On 4/16/2018 12:24 PM, Abhinandan Gujjar wrote:
> Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
I think I acked this complete series. And this patch is v2 not v3. You 
should also mention the changelog.

Thanks,
Akhil

> ---
>  doc/guides/prog_guide/cryptodev_lib.rst | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
> index 066fe2d..b279a20 100644
> --- a/doc/guides/prog_guide/cryptodev_lib.rst
> +++ b/doc/guides/prog_guide/cryptodev_lib.rst
> @@ -299,6 +299,33 @@ directly from the devices processed queue, and for virtual device's from a
>  enqueue call.
>
>
> +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 crypto session.
> +
> +For example, suppose an application is submitting a crypto operation with a session
> +associated and wants to indicate private data information which is required to be
> +used after completion of the crypto operation. In this case, the application can use
> +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 other crypto information such as the IVs (since there can
> +be an IV also for authentication).
> +
> +
>  Enqueue / Dequeue Burst APIs
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
  
Gujjar, Abhinandan S April 16, 2018, 9:36 a.m. UTC | #2
Hi Akhil,

Missed out the *series* and thought the ack was only on the doc patch.
Regarding change log, Just before posting I looked at recent patches.
Most of them, didn't have change log! So, I didn't add it.
Yes, there is a typo in the subject of this patch. Does this require newer version of patches?

Regards
Abhinandan

> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> Sent: Monday, April 16, 2018 2:47 PM
> To: Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; jerin.jacob@caviumnetworks.com;
> hemant.agrawal@nxp.com; dev@dpdk.org
> Cc: Vangati, Narender <narender.vangati@intel.com>; Rao, Nikhil
> <nikhil.rao@intel.com>
> Subject: Re: [v3,3/3] doc: add private data info in crypto guide
> 
> Hi Abhinandan,
> 
> On 4/16/2018 12:24 PM, Abhinandan Gujjar wrote:
> > Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> I think I acked this complete series. And this patch is v2 not v3. You should also
> mention the changelog.
> 
> Thanks,
> Akhil
> 
> > ---
> >  doc/guides/prog_guide/cryptodev_lib.rst | 27
> > +++++++++++++++++++++++++++
> >  1 file changed, 27 insertions(+)
> >
> > diff --git a/doc/guides/prog_guide/cryptodev_lib.rst
> > b/doc/guides/prog_guide/cryptodev_lib.rst
> > index 066fe2d..b279a20 100644
> > --- a/doc/guides/prog_guide/cryptodev_lib.rst
> > +++ b/doc/guides/prog_guide/cryptodev_lib.rst
> > @@ -299,6 +299,33 @@ directly from the devices processed queue, and
> > for virtual device's from a  enqueue call.
> >
> >
> > +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 crypto session.
> > +
> > +For example, suppose an application is submitting a crypto operation
> > +with a session associated and wants to indicate private data
> > +information which is required to be used after completion of the
> > +crypto operation. In this case, the application can use 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 other crypto information such as the IVs (since there
> can be an IV also for authentication).
> > +
> > +
> >  Enqueue / Dequeue Burst APIs
> >  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
  
De Lara Guarch, Pablo April 17, 2018, 1:49 p.m. UTC | #3
Hi,

> -----Original Message-----
> From: Gujjar, Abhinandan S
> Sent: Monday, April 16, 2018 10:36 AM
> To: Akhil Goyal <akhil.goyal@nxp.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; jerin.jacob@caviumnetworks.com;
> hemant.agrawal@nxp.com; dev@dpdk.org
> Cc: Vangati, Narender <narender.vangati@intel.com>; Rao, Nikhil
> <nikhil.rao@intel.com>
> Subject: RE: [v3,3/3] doc: add private data info in crypto guide
> 
> Hi Akhil,
> 
> Missed out the *series* and thought the ack was only on the doc patch.
> Regarding change log, Just before posting I looked at recent patches.
> Most of them, didn't have change log! So, I didn't add it.
> Yes, there is a typo in the subject of this patch. Does this require newer version
> of patches?

Unless there is something else to change, there is no need to send another patchset
just for this typo.
About changelog, it is a good practice to add it. Also, for patchsets, it is good to
add a cover letter, and there you could add the changelog for the entire patchset.

Thanks,
Pablo
  

Patch

diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 066fe2d..b279a20 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -299,6 +299,33 @@  directly from the devices processed queue, and for virtual device's from a
 enqueue call.
 
 
+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 crypto session.
+
+For example, suppose an application is submitting a crypto operation with a session
+associated and wants to indicate private data information which is required to be
+used after completion of the crypto operation. In this case, the application can use
+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 other crypto information such as the IVs (since there can
+be an IV also for authentication).
+
+
 Enqueue / Dequeue Burst APIs
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~