From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: Shally Verma <shally.verma@caviumnetworks.com>,
"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Cc: "Doherty, Declan" <declan.doherty@intel.com>,
"pathreya@caviumnetworks.com" <pathreya@caviumnetworks.com>,
"ssahu@caviumnetworks.com" <ssahu@caviumnetworks.com>,
"agupta@caviumnetworks.com" <agupta@caviumnetworks.com>,
"dev@dpdk.org" <dev@dpdk.org>,
Sunila Sahu <sunila.sahu@caviumnetworks.com>,
Ashish Gupta <ashish.gupta@caviumnetworks.com>
Subject: Re: [dpdk-dev] [PATCH v2 3/6] lib/cryptodev: add asymmetric crypto capability in cryptodev
Date: Tue, 8 May 2018 15:00:00 +0000 [thread overview]
Message-ID: <348A99DA5F5B7549AA880327E580B4358947CD5D@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <1522927489-23668-4-git-send-email-shally.verma@caviumnetworks.com>
Hi Shally,
> -----Original Message-----
> From: Shally Verma [mailto:shally.verma@caviumnetworks.com]
> Sent: Thursday, April 5, 2018 12:25 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: Doherty, Declan <declan.doherty@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> pathreya@caviumnetworks.com; ssahu@caviumnetworks.com; agupta@caviumnetworks.com;
> dev@dpdk.org; Sunila Sahu <sunila.sahu@caviumnetworks.com>; Ashish Gupta
> <ashish.gupta@caviumnetworks.com>
> Subject: [PATCH v2 3/6] lib/cryptodev: add asymmetric crypto capability in cryptodev
>
> Extend cryptodev with asymmetric capability APIs and
> definitions.
>
> 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>
>
> ---
/// snip ///
> +int __rte_experimental
> +rte_cryptodev_asym_xfrm_capability_check_modlen(
> + const struct rte_cryptodev_asymmetric_xfrm_capability *capability,
> + uint16_t modlen)
> +{
> + /* handle special case of 0 which mean PMD define no limit defined */
[Fiona] grammar. Maybe "which means PMD doesn't define any limit"
> + if ((capability->modlen.min != 0) &&
> + ((modlen < capability->modlen.min) ||
> + (capability->modlen.increment != 0 &&
> + (modlen % (capability->modlen.increment)))))
> + return -1;
> + if ((capability->modlen.max != 0) &&
> + ((modlen > capability->modlen.max) ||
> + (capability->modlen.increment != 0 &&
> + (modlen % (capability->modlen.increment)))))
> + return -1;
> +
> + return 0;
> +}
> +
>
> const char *
> rte_cryptodev_get_feature_name(uint64_t flag)
> diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
> index 68d1ae1..deae3d6 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -178,6 +178,37 @@ struct rte_cryptodev_symmetric_capability {
> };
> };
>
> +/**
> + * Asymmetric Xform Crypto Capability
> + *
> + */
> +struct rte_cryptodev_asymmetric_xfrm_capability {
> + enum rte_crypto_asym_xform_type xform_type;
> + /**< Transform type: RSA/MODEXP/DH/DSA/MODINV */
> +
> + uint32_t op_types;
> + /**< bitmask for supported rte_crypto_asym_op_type */
> +
> + __extension__
> + union {
> + struct rte_crypto_param_range modlen;
> + /**< Range of modulus length supported by modulus based xform.
> + * Value 0 mean implementation default
> + */
> + };
> +};
> +
> +/**
> + * Asymmetric Crypto Capability
> + *
> + */
> +struct rte_cryptodev_asymmetric_capability {
> + enum rte_crypto_asym_xform_type xform_type;
> + /**< Transform type: RSA/MODEXP/DH/DSA/MODINV */
> + struct rte_cryptodev_asymmetric_xfrm_capability xfrm_capa;
> +};
[Fiona] Is it necessary to have xform_type in both above structures?
Seems like duplication. Or would it be better if both are combined into 1 struct?
> +
> +
> /** Structure used to capture a capability of a crypto device */
> struct rte_cryptodev_capabilities {
> enum rte_crypto_op_type op;
> @@ -187,6 +218,8 @@ struct rte_cryptodev_capabilities {
> union {
> struct rte_cryptodev_symmetric_capability sym;
> /**< Symmetric operation capability parameters */
> + struct rte_cryptodev_asymmetric_capability asym;
> + /**< Asymmetric operation capability parameters */
> };
> };
/// snip ///
next prev parent reply other threads:[~2018-05-08 15:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 11:24 [dpdk-dev] [PATCH v2 0/6] crypto: add asym crypto support Shally Verma
2018-04-05 11:24 ` [dpdk-dev] [PATCH v2 1/6] lib/cryptodev: add asymmetric algos in cryptodev Shally Verma
2018-05-08 15:08 ` Trahe, Fiona
2018-04-05 11:24 ` [dpdk-dev] [PATCH v2 2/6] lib/cryptodev: add asym op support " Shally Verma
2018-05-08 10:51 ` Trahe, Fiona
2018-05-08 10:58 ` Verma, Shally
2018-05-08 18:32 ` De Lara Guarch, Pablo
2018-05-08 14:43 ` Trahe, Fiona
2018-05-09 7:33 ` Verma, Shally
2018-04-05 11:24 ` [dpdk-dev] [PATCH v2 3/6] lib/cryptodev: add asymmetric crypto capability " Shally Verma
2018-05-08 15:00 ` Trahe, Fiona [this message]
2018-05-09 7:34 ` Verma, Shally
2018-04-05 11:24 ` [dpdk-dev] [PATCH v2 4/6] test/crypto: add unit testcase for asym crypto Shally Verma
2018-04-05 11:24 ` [dpdk-dev] [PATCH v2 5/6] crypto/openssl: add asym crypto support Shally Verma
2018-05-09 10:33 ` Trahe, Fiona
2018-05-09 10:56 ` Verma, Shally
2018-04-05 11:24 ` [dpdk-dev] [PATCH v2 6/6] doc: add asym crypto in cryptodev programmer guide Shally Verma
2018-04-11 12:37 ` [dpdk-dev] [PATCH v2 0/6] crypto: add asym crypto support De Lara Guarch, Pablo
2018-04-11 14:14 ` Verma, Shally
2018-04-20 6:16 ` 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=348A99DA5F5B7549AA880327E580B4358947CD5D@IRSMSX103.ger.corp.intel.com \
--to=fiona.trahe@intel.com \
--cc=agupta@caviumnetworks.com \
--cc=ashish.gupta@caviumnetworks.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
--cc=pathreya@caviumnetworks.com \
--cc=shally.verma@caviumnetworks.com \
--cc=ssahu@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).