DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
To: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>,
	dev@dpdk.org, Kai Ji <kai.ji@intel.com>
Cc: Anoob Joseph <anoobj@marvell.com>,
	bruce.richardson@intel.com, ciara.power@intel.com,
	jerinj@marvell.com, fanzhang.oss@gmail.com,
	arkadiuszx.kusztal@intel.com, david.marchand@redhat.com,
	hemant.agrawal@nxp.com, pablo.de.lara.guarch@intel.com,
	fiona.trahe@intel.com, declan.doherty@intel.com,
	matan@nvidia.com, ruifeng.wang@arm.com,
	Akhil Goyal <gakhil@marvell.com>
Subject: Re: [PATCH v2 2/6] crypto/openssl: support EDDSA
Date: Mon, 9 Sep 2024 10:56:26 +0100	[thread overview]
Message-ID: <4d143aab-c511-4abb-be3d-534ad0c957f3@foss.arm.com> (raw)
In-Reply-To: <20240905133933.741-2-gmuthukrishn@marvell.com>

Hi,

On 05/09/2024 14:39, Gowrishankar Muthukrishnan wrote:
> Support EDDSA crypto algorithm in OpenSSL PMD.
> 
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> ---
>   drivers/crypto/openssl/openssl_pmd_private.h |  13 ++
>   drivers/crypto/openssl/rte_openssl_pmd.c     | 223 +++++++++++++++++++
>   drivers/crypto/openssl/rte_openssl_pmd_ops.c | 131 +++++++++++
>   3 files changed, 367 insertions(+)
<snip>
> +	ctx = BN_CTX_new();
> +	if (!ctx)
> +		goto err_ecfpm;
> +
<snip>
> +
> +err_ecfpm:
> +	BN_CTX_free(ctx);
> +	BN_free(n);
> +	return ret;
> +}
<snip>
> +
> +			md_ctx = EVP_MD_CTX_new();
> +			if (!md_ctx)
> +				goto err_eddsa;
> +
<snip>
> +	cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
> +err_eddsa:
> +	OSSL_PARAM_BLD_free(iparam_bld);
> +
> +	if (sctx)
> +		EVP_PKEY_CTX_free(sctx);
> +
> +	if (cctx)
> +		EVP_PKEY_CTX_free(cctx);
> +
> +	if (pkey)
> +		EVP_PKEY_free(pkey);
> +
> +	return ret;
<etc..>

This (allocating and freeing ctxs for every operation) has pretty bad 
performance, refer to 
https://patches.dpdk.org/project/dpdk/cover/20240703134552.1439633-1-jack.bond-preston@foss.arm.com/ 
for more information.

I suppose for an initial implementation this could be ok - it's correct, 
just slow.

Cheers,
Jack


  reply	other threads:[~2024-09-09  9:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 16:10 [PATCH v1 1/3] cryptodev: add EDDSA asymmetric crypto algorithm Gowrishankar Muthukrishnan
2023-11-29 16:10 ` [PATCH v1 2/3] crypto/openssl: add EDDSA support Gowrishankar Muthukrishnan
2023-11-29 16:10 ` [PATCH v1 3/3] test/crypto: add asymmetric EDDSA test cases Gowrishankar Muthukrishnan
2024-09-05 13:36 ` [PATCH v2 1/6] cryptodev: add EDDSA asymmetric crypto algorithm Gowrishankar Muthukrishnan
2024-09-05 13:39 ` Gowrishankar Muthukrishnan
2024-09-05 13:39   ` [PATCH v2 2/6] crypto/openssl: support EDDSA Gowrishankar Muthukrishnan
2024-09-09  9:56     ` Jack Bond-Preston [this message]
2024-09-05 13:39   ` [PATCH v2 3/6] crypto/cnxk: " Gowrishankar Muthukrishnan
2024-09-05 13:39   ` [PATCH v2 4/6] test/crypto: add asymmetric EDDSA test cases Gowrishankar Muthukrishnan
2024-09-05 13:39   ` [PATCH v2 5/6] examples/fips_validation: support EDDSA Gowrishankar Muthukrishnan
2024-09-05 13:39   ` [PATCH v2 6/6] app/crypto-perf: " Gowrishankar Muthukrishnan

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=4d143aab-c511-4abb-be3d-534ad0c957f3@foss.arm.com \
    --to=jack.bond-preston@foss.arm.com \
    --cc=anoobj@marvell.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=ciara.power@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=fiona.trahe@intel.com \
    --cc=gakhil@marvell.com \
    --cc=gmuthukrishn@marvell.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerinj@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=matan@nvidia.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=ruifeng.wang@arm.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).