DPDK patches and discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Shally Verma <shally.verma@caviumnetworks.com>
Cc: "Trahe, Fiona" <fiona.trahe@intel.com>,
	"akhil.goyal@nxp.com" <akhil.goyal@nxp.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"pathreya@caviumnetworks.com" <pathreya@caviumnetworks.com>,
	Sunila Sahu <sunila.sahu@caviumnetworks.com>,
	Ashish Gupta <ashish.gupta@caviumnetworks.com>
Subject: Re: [dpdk-dev] [PATCH v3 5/6] crypto/openssl: add asym crypto support
Date: Sun, 17 Jun 2018 13:25:10 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8977F8D6A96@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1526450713-17299-6-git-send-email-shally.verma@caviumnetworks.com>



> -----Original Message-----
> From: Shally Verma [mailto:shally.verma@caviumnetworks.com]
> Sent: Wednesday, May 16, 2018 7:05 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; akhil.goyal@nxp.com;
> dev@dpdk.org; pathreya@caviumnetworks.com; Sunila Sahu
> <sunila.sahu@caviumnetworks.com>; Ashish Gupta
> <ashish.gupta@caviumnetworks.com>
> Subject: [PATCH v3 5/6] crypto/openssl: add asym crypto support
> 
> Add asymmetric crypto operation support in openssl PMD.
> Current list of supported asym xforms:
> * RSA
> * DSA
> * Deffie-hellman
> * Modular Operations
> 
> changes from v2:
> - Update the pmd capability as per new capability structure
> 
> changes from v1:
> - resolve new line error in dod/guides/cryptodevs/openssl.rst
> 
> Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
> Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
> Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
> ---
>  doc/guides/cryptodevs/features/openssl.ini       |  11 +
>  doc/guides/cryptodevs/openssl.rst                |   1 +
>  drivers/crypto/openssl/rte_openssl_pmd.c         | 377 ++++++++++++++++++++-
>  drivers/crypto/openssl/rte_openssl_pmd_ops.c     | 395
> ++++++++++++++++++++++-
>  drivers/crypto/openssl/rte_openssl_pmd_private.h |  29 ++
>  5 files changed, 801 insertions(+), 12 deletions(-)
> 
> diff --git a/doc/guides/cryptodevs/features/openssl.ini
> b/doc/guides/cryptodevs/features/openssl.ini
> index 691565865..bef5c7f79 100644
> --- a/doc/guides/cryptodevs/features/openssl.ini
> +++ b/doc/guides/cryptodevs/features/openssl.ini
> @@ -7,6 +7,7 @@
>  Symmetric crypto       = Y
>  Sym operation chaining = Y
>  Mbuf scatter gather    = Y
> +Asymmetric crypto	   = Y
> 
>  ;
>  ; Supported crypto algorithms of the 'openssl' crypto driver.
> @@ -49,3 +50,13 @@ AES GCM (256) = Y
>  AES CCM (128) = Y
>  AES CCM (192) = Y
>  AES CCM (256) = Y
> +
> +;
> +; Supported Asymmetric algorithms of the 'openssl' crypto driver.
> +;
> +[Asymmetric]
> +RSA = Y
> +DSA = Y
> +Modular Exponentiation = Y
> +Modular Inversion = Y
> +Deffie-hellman = Y

You need to add these parameters in default.ini file,
otherwise they are not shown when building the documentation.

> diff --git a/doc/guides/cryptodevs/openssl.rst
> b/doc/guides/cryptodevs/openssl.rst
> index 427fc807c..4f90be888 100644
> --- a/doc/guides/cryptodevs/openssl.rst
> +++ b/doc/guides/cryptodevs/openssl.rst
> @@ -80,6 +80,7 @@ crypto processing.
> 
>  Test name is cryptodev_openssl_autotest.
>  For performance test cryptodev_openssl_perftest can be used.
> +For asymmetric crypto operations testing, run
> +cryptodev_openssl_asym_autotest
> 
>  To verify real traffic l2fwd-crypto example can be used with this command:
> 
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c
> b/drivers/crypto/openssl/rte_openssl_pmd.c
> index f584d0d6f..527e42773 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c

...

> +		}
> +		dh_key->priv_key = BN_bin2bn(op->priv_key.data,
> +					     op->priv_key.length,
> +					     dh_key->priv_key);

As on the previous patch, I am getting a compilation issue:

drivers/crypto/openssl/rte_openssl_pmd.c:1711:9: error:
dereferencing pointer to incomplete type 'DH {aka struct dh_st}'
   dh_key->priv_key = BN_bin2bn(op->priv_key.data,

...

> diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> index 1cb87d59a..76f7410cb 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c

...

>  struct rte_cryptodev_ops openssl_pmd_ops = {
>  		.dev_configure		= openssl_pmd_config,
>  		.dev_start		= openssl_pmd_start,
> @@ -750,8 +1138,11 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
>  		.queue_pair_count	= openssl_pmd_qp_count,
> 
>  		.session_get_size	= openssl_pmd_session_get_size,
> +		.asym_session_get_size	=
> openssl_pmd_asym_session_get_size,
>  		.session_configure	= openssl_pmd_session_configure,
> -		.session_clear		= openssl_pmd_session_clear
> +		.asym_session_configure	=
> openssl_pmd_asym_session_configure,
> +		.session_clear		= openssl_pmd_session_clear,
> +		.asym_session_clear	= openssl_pmd_asym_session_clear
>  };

I think session_get_size, session_configure and session_clear should be renamed
to sym_session_*, to avoid confusion. Could you add another patch renaming these?

Thanks,
Pablo

  reply	other threads:[~2018-06-17 13:25 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16  6:05 [dpdk-dev] [PATCH v3 0/6] crypto: " Shally Verma
2018-05-16  6:05 ` [dpdk-dev] [PATCH v3 1/6] lib/cryptodev: add asymmetric algos in cryptodev Shally Verma
2018-06-15  8:40   ` De Lara Guarch, Pablo
2018-06-22 15:38     ` Verma, Shally
2018-06-25 21:34       ` De Lara Guarch, Pablo
2018-06-26 11:54         ` Verma, Shally
2018-05-16  6:05 ` [dpdk-dev] [PATCH v3 2/6] lib/cryptodev: add asym op support " Shally Verma
2018-06-15  9:05   ` De Lara Guarch, Pablo
2018-06-26  9:20   ` De Lara Guarch, Pablo
2018-06-26 11:21     ` Verma, Shally
2018-05-16  6:05 ` [dpdk-dev] [PATCH v3 3/6] lib/cryptodev: add asymmetric crypto capability " Shally Verma
2018-06-17 12:11   ` De Lara Guarch, Pablo
2018-07-03 14:12   ` Trahe, Fiona
2018-07-03 14:47     ` Verma, Shally
2018-05-16  6:05 ` [dpdk-dev] [PATCH v3 4/6] test/crypto: add unit testcase for asym crypto Shally Verma
2018-06-17 12:52   ` De Lara Guarch, Pablo
2018-06-17 15:01     ` Verma, Shally
2018-06-17 19:31       ` De Lara Guarch, Pablo
2018-06-18  5:40         ` Verma, Shally
2018-06-18  6:39           ` Akhil Goyal
2018-06-18  6:48             ` Verma, Shally
2018-06-18  7:34               ` Akhil Goyal
2018-06-18  8:38                 ` De Lara Guarch, Pablo
2018-06-18 16:22                   ` Verma, Shally
2018-05-16  6:05 ` [dpdk-dev] [PATCH v3 5/6] crypto/openssl: add asym crypto support Shally Verma
2018-06-17 13:25   ` De Lara Guarch, Pablo [this message]
2018-06-17 15:48     ` Verma, Shally
2018-06-17 19:38       ` De Lara Guarch, Pablo
2018-06-18  5:30         ` Verma, Shally
2018-06-23 12:41           ` Verma, Shally
2018-06-23 18:16             ` De Lara Guarch, Pablo
2018-06-23 18:26               ` Verma, Shally
2018-06-25 16:35                 ` De Lara Guarch, Pablo
2018-06-26  9:23   ` De Lara Guarch, Pablo
2018-06-26 11:22     ` Verma, Shally
2018-07-03 14:50   ` Trahe, Fiona
2018-07-03 14:59     ` Verma, Shally
2018-07-03 15:11       ` Trahe, Fiona
2018-07-03 15:14         ` Verma, Shally
2018-05-16  6:05 ` [dpdk-dev] [PATCH v3 6/6] doc: add asym crypto in cryptodev programmer guide Shally Verma
2018-06-14 10:43   ` Kovacevic, Marko
2018-06-15  8:06     ` Verma, Shally
2018-06-17 13:33   ` De Lara Guarch, Pablo
2018-06-17 16:59     ` Verma, Shally

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=E115CCD9D858EF4F90C690B0DCB4D8977F8D6A96@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=ashish.gupta@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=pathreya@caviumnetworks.com \
    --cc=shally.verma@caviumnetworks.com \
    --cc=sunila.sahu@caviumnetworks.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).