DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: Ayuj Verma <ayverma@marvell.com>
Cc: "arkadiuszx.kusztal@intel.com" <arkadiuszx.kusztal@intel.com>,
	"fiona.trahe@intel.com" <fiona.trahe@intel.com>,
	Shally Verma <shallyv@marvell.com>,
	Sunila Sahu <ssahu@marvell.com>,
	Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>,
	Arvind Desai <adesai@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 3/3] test/crypto: check for rsa key type feature flag
Date: Sun, 17 Mar 2019 17:49:21 +0000	[thread overview]
Message-ID: <994feb55-441b-a614-a37e-fd349c3830af@nxp.com> (raw)
Message-ID: <20190317174921.fzsEsxQm7eZlB8sMpZ7UPEXRRhxEsYeSZ1qYtdZrWzw@z> (raw)
In-Reply-To: <20190227133258.8962-4-ayverma@marvell.com>

Hi Ayuj,


On 2/27/2019 7:03 PM, Ayuj Verma wrote:
> Check for RSA private key type feature flag in
> private key operations
>
> Signed-off-by: Ayuj Verma <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>   test/test/test_cryptodev_asym.c | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+)
Please rebase this patch.
>
> diff --git a/test/test/test_cryptodev_asym.c b/test/test/test_cryptodev_asym.c
> index 0f6fc5767..950a7bd00 100644
> --- a/test/test/test_cryptodev_asym.c
> +++ b/test/test/test_cryptodev_asym.c
> @@ -49,6 +49,7 @@ test_rsa_sign_verify(void)
>   	struct rte_mempool *op_mpool = ts_params->op_mpool;
>   	struct rte_mempool *sess_mpool = ts_params->session_mpool;
>   	uint8_t dev_id = ts_params->valid_devs[0];
> +	struct rte_cryptodev_info dev_info;
>   	struct rte_crypto_asym_op *asym_op = NULL;
>   	struct rte_crypto_op *op = NULL, *result_op = NULL;
>   	struct rte_cryptodev_asym_session *sess = NULL;
> @@ -56,6 +57,18 @@ test_rsa_sign_verify(void)
>   	uint8_t output_buf[TEST_DATA_SIZE] = {0};
>   	uint8_t input_buf[TEST_DATA_SIZE] = {0};
>   
> +	/* test case supports op with exponent keyonly,
> +	 * so check for it in feature_flags
> +	 */
> +	rte_cryptodev_info_get(dev_id, &dev_info);
> +	if (!(dev_info.feature_flags &
> +				RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) {
> +		RTE_LOG(INFO, USER1,
> +				"Device doesn't support sign op with "
> +				"exponent key type. Test Skipped\n");
> +		return TEST_SKIPPED;
> +	}
> +
>   	sess = rte_cryptodev_asym_session_create(sess_mpool);
>   
>   	if (!sess) {
> @@ -183,12 +196,25 @@ test_rsa_enc_dec(void)
>   	struct rte_mempool *op_mpool = ts_params->op_mpool;
>   	struct rte_mempool *sess_mpool = ts_params->session_mpool;
>   	uint8_t dev_id = ts_params->valid_devs[0];
> +	struct rte_cryptodev_info dev_info;
>   	struct rte_crypto_asym_op *asym_op = NULL;
>   	struct rte_crypto_op *op = NULL, *result_op = NULL;
>   	struct rte_cryptodev_asym_session *sess = NULL;
>   	int status = TEST_SUCCESS;
>   	uint8_t input_buf[TEST_DATA_SIZE] = {0};
>   
> +	/* test case supports op with exponent keyonly,
> +	 * so check for it in feature_flags
> +	 */
> +	rte_cryptodev_info_get(dev_id, &dev_info);
> +	if (!(dev_info.feature_flags &
> +				RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) {
> +		RTE_LOG(INFO, USER1,
> +				"Device doesn't support sign op with "
> +				"exponent key type. Test Skipped\n");
> +		return TEST_SKIPPED;
> +	}
> +
>   	sess = rte_cryptodev_asym_session_create(sess_mpool);
>   
>   	if (!sess) {


  reply	other threads:[~2019-03-17 17:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 13:33 [dpdk-dev] [PATCH v2 0/3] adding rsa priv key " Ayuj Verma
2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add " Ayuj Verma
2019-03-17 17:46   ` Akhil Goyal
2019-03-17 17:46     ` Akhil Goyal
2019-03-18 18:05     ` Ayuj Verma
2019-03-18 18:05       ` Ayuj Verma
2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 2/3] crypto/openssl: set rsa private op " Ayuj Verma
2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 3/3] test/crypto: check for rsa key type " Ayuj Verma
2019-03-17 17:49   ` Akhil Goyal [this message]
2019-03-17 17:49     ` Akhil Goyal
2019-03-05  9:11 ` [dpdk-dev] [PATCH v2 0/3] adding rsa priv key " Ayuj Verma
2019-03-13  7:29   ` Ayuj Verma
2019-03-13 19:02     ` Kusztal, ArkadiuszX
2019-03-13 19:06 ` Kusztal, ArkadiuszX
2019-03-13 19:06   ` Kusztal, ArkadiuszX

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=994feb55-441b-a614-a37e-fd349c3830af@nxp.com \
    --to=akhil.goyal@nxp.com \
    --cc=adesai@marvell.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=ayverma@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=kkotamarthy@marvell.com \
    --cc=shallyv@marvell.com \
    --cc=ssahu@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).