[v2] doc: announce restructuring of crypto session structs

Message ID 20210803120112.694697-1-gakhil@marvell.com (mailing list archive)
State Accepted, archived
Headers
Series [v2] doc: announce restructuring of crypto session structs |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing warning apply patch failure
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Akhil Goyal Aug. 3, 2021, 12:01 p.m. UTC
  The structures rte_cryptodev_sym_session and
rte_cryptodev_asym_session are not used by the
application directly. The application just need
an opaque pointer which it can attach to rte_crypto_op
while enqueue.
Hence, these structures can be internal to library
hidden from the user.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
v2: fixed trailing whitespace.

 doc/guides/rel_notes/deprecation.rst | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Fan Zhang Aug. 5, 2021, 1:57 p.m. UTC | #1
Hi Akhil,

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Tuesday, August 3, 2021 1:01 PM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; Nicolau, Radu <radu.nicolau@intel.com>; Doherty,
> Declan <declan.doherty@intel.com>; hemant.agrawal@nxp.com;
> matan@nvidia.com; Ananyev, Konstantin <konstantin.ananyev@intel.com>;
> thomas@monjalon.net; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> asomalap@amd.com; ruifeng.wang@arm.com;
> ajit.khaparde@broadcom.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> adwivedi@marvell.com; michaelsh@marvell.com;
> rnagadheeraj@marvell.com; jianjay.zhou@huawei.com; Akhil Goyal
> <gakhil@marvell.com>
> Subject: [PATCH v2] doc: announce restructuring of crypto session structs
> 
> The structures rte_cryptodev_sym_session and
> rte_cryptodev_asym_session are not used by the
> application directly. The application just need
> an opaque pointer which it can attach to rte_crypto_op
> while enqueue.
> Hence, these structures can be internal to library
> hidden from the user.
> 
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> ---
> v2: fixed trailing whitespace.
> 
>  doc/guides/rel_notes/deprecation.rst | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index f81bd87f10..c540c90f8e 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -151,6 +151,11 @@ Deprecation Notices
>  * cryptodev: The APIs for interfacing between library and PMD will be
> marked
>    as internal APIs in DPDK 21.11.
> 
> +* cryptodev: Hide structures ``rte_cryptodev_sym_session`` and
> +  ``rte_cryptodev_asym_session`` to remove unnecessary indirection
> between
> +  session and the private data of session. An opaque pointer can be exposed
> +  directly to application which can be attached to the ``rte_crypto_op``.
> +
>  * security: The functions ``rte_security_set_pkt_metadata`` and
>    ``rte_security_get_userdata`` will be made inline functions and additional
>    flags will be added in structure ``rte_security_ctx`` in DPDK 21.11.
> --
> 2.25.1

Have you considered how crypto scheduler PMD can support multiple crypto devices' opaque data pointers after the change? Of course it is doable by adding dedicated APIs to the scheduler PMD - shall I assume you will work on it?

Regards,
Fan
  
Akhil Goyal Aug. 5, 2021, 2:09 p.m. UTC | #2
Hi Fan,
> Hi Akhil,
> 
> > The structures rte_cryptodev_sym_session and
> > rte_cryptodev_asym_session are not used by the
> > application directly. The application just need
> > an opaque pointer which it can attach to rte_crypto_op
> > while enqueue.
> > Hence, these structures can be internal to library
> > hidden from the user.
> >
> > Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> > ---
> > v2: fixed trailing whitespace.
> >
> >  doc/guides/rel_notes/deprecation.rst | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/doc/guides/rel_notes/deprecation.rst
> > b/doc/guides/rel_notes/deprecation.rst
> > index f81bd87f10..c540c90f8e 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -151,6 +151,11 @@ Deprecation Notices
> >  * cryptodev: The APIs for interfacing between library and PMD will be
> > marked
> >    as internal APIs in DPDK 21.11.
> >
> > +* cryptodev: Hide structures ``rte_cryptodev_sym_session`` and
> > +  ``rte_cryptodev_asym_session`` to remove unnecessary indirection
> > between
> > +  session and the private data of session. An opaque pointer can be
> exposed
> > +  directly to application which can be attached to the ``rte_crypto_op``.
> > +
> >  * security: The functions ``rte_security_set_pkt_metadata`` and
> >    ``rte_security_get_userdata`` will be made inline functions and additional
> >    flags will be added in structure ``rte_security_ctx`` in DPDK 21.11.
> > --
> > 2.25.1
> 
> Have you considered how crypto scheduler PMD can support multiple crypto
> devices' opaque data pointers after the change? Of course it is doable by
> adding dedicated APIs to the scheduler PMD - shall I assume you will work on
> it?

I haven't considered about the scheduler PMD yet. Would need your help in aligning that.
The deprecation notice is to allow us change in 21.11 timeframe.

Thanks,
Akhil
  
Fan Zhang Aug. 5, 2021, 2:53 p.m. UTC | #3
Hi Akhil,

No problem. Glad to help. If you have code ready to share please let me know.

Regards,
Fan

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, August 5, 2021 3:10 PM
> To: Zhang, Roy Fan <roy.fan.zhang@intel.com>; dev@dpdk.org
> Cc: Anoob Joseph <anoobj@marvell.com>; Nicolau, Radu
> <radu.nicolau@intel.com>; Doherty, Declan <declan.doherty@intel.com>;
> hemant.agrawal@nxp.com; matan@nvidia.com; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; thomas@monjalon.net;
> asomalap@amd.com; ruifeng.wang@arm.com;
> ajit.khaparde@broadcom.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> Ankur Dwivedi <adwivedi@marvell.com>; Michael Shamis
> <michaelsh@marvell.com>; Nagadheeraj Rottela
> <rnagadheeraj@marvell.com>; jianjay.zhou@huawei.com
> Subject: RE: [PATCH v2] doc: announce restructuring of crypto session structs
> 
> Hi Fan,
> > Hi Akhil,
> >
> > > The structures rte_cryptodev_sym_session and
> > > rte_cryptodev_asym_session are not used by the
> > > application directly. The application just need
> > > an opaque pointer which it can attach to rte_crypto_op
> > > while enqueue.
> > > Hence, these structures can be internal to library
> > > hidden from the user.
> > >
> > > Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> > > ---
> > > v2: fixed trailing whitespace.
> > >
> > >  doc/guides/rel_notes/deprecation.rst | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > >
> > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > b/doc/guides/rel_notes/deprecation.rst
> > > index f81bd87f10..c540c90f8e 100644
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > @@ -151,6 +151,11 @@ Deprecation Notices
> > >  * cryptodev: The APIs for interfacing between library and PMD will be
> > > marked
> > >    as internal APIs in DPDK 21.11.
> > >
> > > +* cryptodev: Hide structures ``rte_cryptodev_sym_session`` and
> > > +  ``rte_cryptodev_asym_session`` to remove unnecessary indirection
> > > between
> > > +  session and the private data of session. An opaque pointer can be
> > exposed
> > > +  directly to application which can be attached to the ``rte_crypto_op``.
> > > +
> > >  * security: The functions ``rte_security_set_pkt_metadata`` and
> > >    ``rte_security_get_userdata`` will be made inline functions and
> additional
> > >    flags will be added in structure ``rte_security_ctx`` in DPDK 21.11.
> > > --
> > > 2.25.1
> >
> > Have you considered how crypto scheduler PMD can support multiple
> crypto
> > devices' opaque data pointers after the change? Of course it is doable by
> > adding dedicated APIs to the scheduler PMD - shall I assume you will work
> on
> > it?
> 
> I haven't considered about the scheduler PMD yet. Would need your help in
> aligning that.
> The deprecation notice is to allow us change in 21.11 timeframe.
> 
> Thanks,
> Akhil
  
Akhil Goyal Aug. 5, 2021, 3:03 p.m. UTC | #4
> Hi Akhil,
> 
> No problem. Glad to help. If you have code ready to share please let me
> know.
> 
I haven't started work on this yet. There are a few items in ABI improvements,
If you could pick some of them, it would be helpful.
I am currently working on PMD interface.
- Security and crypto session structs are next inline.
If you can spend some time, you could work on
rte_cryptodev and rte_cryptodev_data split and hide.
  
Matan Azrad Aug. 8, 2021, 7:50 a.m. UTC | #5
From: Akhil Goyal
> The structures rte_cryptodev_sym_session and
> rte_cryptodev_asym_session are not used by the application directly. The
> application just need an opaque pointer which it can attach to rte_crypto_op
> while enqueue.
> Hence, these structures can be internal to library hidden from the user.
> 
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Matan Azrad <matan@nvidia.com>
  
Thomas Monjalon Aug. 8, 2021, 8:08 a.m. UTC | #6
> > The structures rte_cryptodev_sym_session and
> > rte_cryptodev_asym_session are not used by the application directly. The
> > application just need an opaque pointer which it can attach to rte_crypto_op
> > while enqueue.
> > Hence, these structures can be internal to library hidden from the user.
> > 
> > Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> Acked-by: Matan Azrad <matan@nvidia.com>

Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>

Applied, thanks.
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index f81bd87f10..c540c90f8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -151,6 +151,11 @@  Deprecation Notices
 * cryptodev: The APIs for interfacing between library and PMD will be marked
   as internal APIs in DPDK 21.11.
 
+* cryptodev: Hide structures ``rte_cryptodev_sym_session`` and
+  ``rte_cryptodev_asym_session`` to remove unnecessary indirection between
+  session and the private data of session. An opaque pointer can be exposed
+  directly to application which can be attached to the ``rte_crypto_op``.
+
 * security: The functions ``rte_security_set_pkt_metadata`` and
   ``rte_security_get_userdata`` will be made inline functions and additional
   flags will be added in structure ``rte_security_ctx`` in DPDK 21.11.