From: Ayuj Verma <ayverma@marvell.com>
To: "akhil.goyal@nxp.com" <akhil.goyal@nxp.com>
Cc: "arkadiuszx.kusztal@intel.com" <arkadiuszx.kusztal@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>,
Ayuj Verma <ayverma@marvell.com>
Subject: [dpdk-dev] [PATCH v3 3/4] app/test: check for key type ff in asym unit test
Date: Thu, 28 Mar 2019 10:28:40 +0000 [thread overview]
Message-ID: <1553768834-19072-4-git-send-email-ayverma@marvell.com> (raw)
In-Reply-To: <1553768834-19072-1-git-send-email-ayverma@marvell.com>
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
---
app/test/test_cryptodev_asym.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index a779e8f..539eda1 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -49,6 +49,7 @@ struct crypto_unittest_params {
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 @@ struct crypto_unittest_params {
uint8_t output_buf[TEST_DATA_SIZE] = {0};
uint8_t input_buf[TEST_DATA_SIZE] = {0};
+ /* test case supports op with exponent key only,
+ * Check in PMD feature flag for RSA exponent key type support.
+ */
+ 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 @@ struct crypto_unittest_params {
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 key only,
+ * Check in PMD feature flag for RSA exponent key type support.
+ */
+ 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) {
--
1.8.3.1
next prev parent reply other threads:[~2019-03-28 10:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-28 10:27 [dpdk-dev] [PATCH v3 0/4] adding rsa priv key feature flag Ayuj Verma
2019-03-28 10:27 ` Ayuj Verma
2019-03-28 10:28 ` [dpdk-dev] [PATCH v3 1/4] lib/cryptodev: add " Ayuj Verma
2019-03-28 10:28 ` Ayuj Verma
2019-03-28 10:28 ` [dpdk-dev] [PATCH v3 2/4] crypto/openssl: set rsa private op " Ayuj Verma
2019-03-28 10:28 ` Ayuj Verma
2019-03-28 10:28 ` Ayuj Verma [this message]
2019-03-28 10:28 ` [dpdk-dev] [PATCH v3 3/4] app/test: check for key type ff in asym unit test Ayuj Verma
2019-03-28 10:28 ` [dpdk-dev] [PATCH v3 4/4] doc: add rsa key type to feature list Ayuj Verma
2019-03-28 10:28 ` Ayuj Verma
2019-03-29 15:01 ` [dpdk-dev] [PATCH v3 0/4] adding rsa priv key feature flag Akhil Goyal
2019-03-29 15:01 ` Akhil Goyal
2019-03-29 15:17 ` Akhil Goyal
2019-03-29 15:17 ` Akhil Goyal
2019-03-29 15:20 ` Ayuj Verma
2019-03-29 15:20 ` Ayuj Verma
2019-04-03 8:47 ` Akhil Goyal
2019-04-03 8:47 ` Akhil Goyal
2019-04-03 10:09 ` Ayuj Verma
2019-04-03 10:09 ` Ayuj Verma
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=1553768834-19072-4-git-send-email-ayverma@marvell.com \
--to=ayverma@marvell.com \
--cc=adesai@marvell.com \
--cc=akhil.goyal@nxp.com \
--cc=arkadiuszx.kusztal@intel.com \
--cc=dev@dpdk.org \
--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).