From: Ankur Dwivedi <adwivedi@marvell.com>
To: <dev@dpdk.org>
Cc: <declan.doherty@intel.com>, <pablo.de.lara.guarch@intel.com>,
<akhil.goyal@nxp.com>, <anoobj@marvell.com>,
Ankur Dwivedi <adwivedi@marvell.com>
Subject: [dpdk-dev] [PATCH] app/test: handle -ENOTSUP from session init
Date: Thu, 7 May 2020 20:56:10 +0530 [thread overview]
Message-ID: <1588865170-965-1-git-send-email-adwivedi@marvell.com> (raw)
In-Reply-To: <1588596047-14965-1-git-send-email-adwivedi@marvell.com>
The session init routine rte_cryptodev_sym_session_init(),
could return -ENOTSUP when the requested algo combination
is not supported by the PMD. This should be treated as
unsupported features. For other return values like -EINVAL
or -ENOMEM the test can be treated as failure.
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
v2:
* Updated test_msg to print UNSUPPORTED for the test case.
app/test/test_cryptodev_blockcipher.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 473dad9..3ea1175 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -427,9 +427,13 @@
nb_iterates == 0) {
sess = rte_cryptodev_sym_session_create(sess_mpool);
- rte_cryptodev_sym_session_init(dev_id, sess, init_xform,
- sess_priv_mpool);
- if (!sess) {
+ status = rte_cryptodev_sym_session_init(dev_id, sess,
+ init_xform, sess_priv_mpool);
+ if (status == -ENOTSUP) {
+ snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "UNSUPPORTED");
+ goto error_exit;
+ }
+ if (!sess || status < 0) {
snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "line %u "
"FAILED: %s", __LINE__,
"Session creation failed");
--
1.9.3
next prev parent reply other threads:[~2020-05-07 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 12:40 Ankur Dwivedi
2020-05-04 13:05 ` Anoob Joseph
2020-05-07 15:26 ` Ankur Dwivedi [this message]
2020-05-09 22:09 ` Akhil Goyal
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=1588865170-965-1-git-send-email-adwivedi@marvell.com \
--to=adwivedi@marvell.com \
--cc=akhil.goyal@nxp.com \
--cc=anoobj@marvell.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.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).