[v2] cryptodev: extend api of asymmetric crypto by sessionless

Message ID 20190906115735.12488-1-arkadiuszx.kusztal@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers
Series [v2] cryptodev: extend api of asymmetric crypto by sessionless |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/iol-dpdk_compile success Compile Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Arkadiusz Kusztal Sept. 6, 2019, 11:57 a.m. UTC
  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 <arkadiuszx.kusztal@intel.com>
---
 lib/librte_cryptodev/rte_crypto_asym.h | 9 +++++++--
 lib/librte_cryptodev/rte_cryptodev.h   | 2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)
  

Comments

Shally Verma Sept. 8, 2019, 6:18 a.m. UTC | #1
Hi Arek

Only these changes looks good to me but do you have working PMD to back this? Also, documentation updates?

Thanks
Shally

> -----Original Message-----
> From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> Sent: Friday, September 6, 2019 5:28 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Shally Verma
> <shallyv@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Arek
> Kusztal <arkadiuszx.kusztal@intel.com>
> Subject: [EXT] [PATCH v2] cryptodev: extend api of asymmetric crypto by
> sessionless
> 
> External Email
> 
> ----------------------------------------------------------------------
> 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 <arkadiuszx.kusztal@intel.com>
> ---
>  lib/librte_cryptodev/rte_crypto_asym.h | 9 +++++++--
>  lib/librte_cryptodev/rte_cryptodev.h   | 2 ++
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> 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 data
> */
> +#define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS		(1ULL << 20)
> +/**< Support asymmetric session-less operations */
> 
> 
>  /**
> --
> 2.1.0
  
Fiona Trahe Sept. 9, 2019, 10:23 a.m. UTC | #2
Hi Shally, 
QAT implementation and test code was sent on Friday in this and related patches:
http://patches.dpdk.org/patch/58839/
Fiona

> -----Original Message-----
> From: Shally Verma [mailto:shallyv@marvell.com]
> Sent: Sunday, September 8, 2019 7:19 AM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; Anoob Joseph
> <anoobj@marvell.com>
> Subject: RE: [EXT] [PATCH v2] cryptodev: extend api of asymmetric crypto by sessionless
> 
> Hi Arek
> 
> Only these changes looks good to me but do you have working PMD to back this? Also, documentation
> updates?
> 
> Thanks
> Shally
> 
> > -----Original Message-----
> > From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > Sent: Friday, September 6, 2019 5:28 PM
> > To: dev@dpdk.org
> > Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Shally Verma
> > <shallyv@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Arek
> > Kusztal <arkadiuszx.kusztal@intel.com>
> > Subject: [EXT] [PATCH v2] cryptodev: extend api of asymmetric crypto by
> > sessionless
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > 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 <arkadiuszx.kusztal@intel.com>
> > ---
> >  lib/librte_cryptodev/rte_crypto_asym.h | 9 +++++++--
> >  lib/librte_cryptodev/rte_cryptodev.h   | 2 ++
> >  2 files changed, 9 insertions(+), 2 deletions(-)
> >
> > 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 data
> > */
> > +#define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS		(1ULL << 20)
> > +/**< Support asymmetric session-less operations */
> >
> >
> >  /**
> > --
> > 2.1.0
  
Akhil Goyal Oct. 3, 2019, 2:28 p.m. UTC | #3
Hi Shally,

Any more comments on this patch.
If not please Ack.

Regards,
Akhil

> -----Original Message-----
> From: Shally Verma <shallyv@marvell.com>
> Sent: Sunday, September 8, 2019 11:49 AM
> To: Arek Kusztal <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: Akhil Goyal <akhil.goyal@nxp.com>; fiona.trahe@intel.com; Anoob Joseph
> <anoobj@marvell.com>
> Subject: RE: [EXT] [PATCH v2] cryptodev: extend api of asymmetric crypto by
> sessionless
> 
> Hi Arek
> 
> Only these changes looks good to me but do you have working PMD to back this?
> Also, documentation updates?
> 
> Thanks
> Shally
> 
> > -----Original Message-----
> > From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > Sent: Friday, September 6, 2019 5:28 PM
> > To: dev@dpdk.org
> > Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Shally Verma
> > <shallyv@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Arek
> > Kusztal <arkadiuszx.kusztal@intel.com>
> > Subject: [EXT] [PATCH v2] cryptodev: extend api of asymmetric crypto by
> > sessionless
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > 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 <arkadiuszx.kusztal@intel.com>
> > ---
> >  lib/librte_cryptodev/rte_crypto_asym.h | 9 +++++++--
> >  lib/librte_cryptodev/rte_cryptodev.h   | 2 ++
> >  2 files changed, 9 insertions(+), 2 deletions(-)
> >
> > 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 data
> > */
> > +#define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS		(1ULL << 20)
> > +/**< Support asymmetric session-less operations */
> >
> >
> >  /**
> > --
> > 2.1.0
  
Anoob Joseph Oct. 4, 2019, 3:31 a.m. UTC | #4
> -----Original Message-----
> From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> Sent: Friday, September 6, 2019 5:28 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Shally Verma
> <shallyv@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Arek
> Kusztal <arkadiuszx.kusztal@intel.com>
> Subject: [EXT] [PATCH v2] cryptodev: extend api of asymmetric crypto by
> sessionless
> 
> External Email
> 
> ----------------------------------------------------------------------
> 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 <arkadiuszx.kusztal@intel.com>
> ---
>  lib/librte_cryptodev/rte_crypto_asym.h | 9 +++++++--
>  lib/librte_cryptodev/rte_cryptodev.h   | 2 ++
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 

Acked-by: Anoob Joseph <anoobj@marvell.com>
  
Akhil Goyal Oct. 4, 2019, 10:55 a.m. UTC | #5
> >
> > ----------------------------------------------------------------------
> > 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 <arkadiuszx.kusztal@intel.com>
> > ---
> >  lib/librte_cryptodev/rte_crypto_asym.h | 9 +++++++--
> >  lib/librte_cryptodev/rte_cryptodev.h   | 2 ++
> >  2 files changed, 9 insertions(+), 2 deletions(-)
> >
> 
> Acked-by: Anoob Joseph <anoobj@marvell.com>

Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied to dpdk-next-crypto

Thanks.
  
Akhil Goyal Oct. 4, 2019, 11:33 a.m. UTC | #6
> 
> > >
> > > ----------------------------------------------------------------------
> > > 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 <arkadiuszx.kusztal@intel.com>
> > > ---
> > >  lib/librte_cryptodev/rte_crypto_asym.h | 9 +++++++--
> > >  lib/librte_cryptodev/rte_cryptodev.h   | 2 ++
> > >  2 files changed, 9 insertions(+), 2 deletions(-)
> > >
> >
> > Acked-by: Anoob Joseph <anoobj@marvell.com>
> 
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> 
> Applied to dpdk-next-crypto
> 
> Thanks.

This patch is taken back from the tree.

This patch need updates to "doc/guides/prog_guide/cryptodev_lib.rst"
For sessionless support in asymmetric operations.
  
Fiona Trahe Oct. 8, 2019, 1:47 p.m. UTC | #7
Hi Arek, Akhil,

> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> Sent: Friday, October 4, 2019 12:34 PM
> To: Akhil Goyal <akhil.goyal@nxp.com>; Anoob Joseph <anoobj@marvell.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; Shally Verma <shallyv@marvell.com>
> Subject: RE: [EXT] [PATCH v2] 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 <arkadiuszx.kusztal@intel.com>
> > > > ---
> > > >  lib/librte_cryptodev/rte_crypto_asym.h | 9 +++++++--
> > > >  lib/librte_cryptodev/rte_cryptodev.h   | 2 ++
> > > >  2 files changed, 9 insertions(+), 2 deletions(-)
> > > >
> > >
> > > Acked-by: Anoob Joseph <anoobj@marvell.com>
> >
> > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> >
> > Applied to dpdk-next-crypto
> >
> > Thanks.
> 
> This patch is taken back from the tree.
> 
> This patch need updates to "doc/guides/prog_guide/cryptodev_lib.rst"
> For sessionless support in asymmetric operations.

Documentation updates also needed in crypto devices Supported Feature Flag matrix
  

Patch

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 data */
+#define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS		(1ULL << 20)
+/**< Support asymmetric session-less operations */
 
 
 /**