DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "akhil.goyal@nxp.com" <akhil.goyal@nxp.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>,
	"shallyv@marvell.com" <shallyv@marvell.com>,
	"anoobj@marvell.com" <anoobj@marvell.com>
Subject: Re: [dpdk-dev] [PATCH v3] cryptodev: extend api of asymmetric crypto by sessionless
Date: Wed, 9 Oct 2019 10:44:50 +0000	[thread overview]
Message-ID: <06EE24DD0B19E248B53F6DC8657831551B2A0014@hasmsx109.ger.corp.intel.com> (raw)
In-Reply-To: <20191009083255.8804-1-arkadiuszx.kusztal@intel.com>

Hi Akhil,

I will send v4 as I will change a little bit formatting in documentation.

> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Wednesday, October 9, 2019 10:33 AM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>;
> shallyv@marvell.com; anoobj@marvell.com; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> 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 <arkadiuszx.kusztal@intel.com>
> ---
> 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     =
>  RSA PRIV OP KEY EXP    =
>  RSA PRIV OP KEY QT     =
>  Digest encrypted       =
> +Asymmetric sessionless =
> 
>  ;
>  ; 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.
> +
> +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 data
> */
> +#define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS		(1ULL << 20)
> +/**< Support asymmetric session-less operations */
> 
> 
>  /**
> --
> 2.1.0


  reply	other threads:[~2019-10-09 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09  8:32 Arek Kusztal
2019-10-09 10:44 ` Kusztal, ArkadiuszX [this message]
2019-10-09 10:54   ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06EE24DD0B19E248B53F6DC8657831551B2A0014@hasmsx109.ger.corp.intel.com \
    --to=arkadiuszx.kusztal@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=shallyv@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).