From: Anoob Joseph <anoobj@marvell.com>
To: Ankur Dwivedi <adwivedi@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Akhil Goyal <akhil.goyal@nxp.com>,
"declan.doherty@intel.com" <declan.doherty@intel.com>,
"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/test: handle -ENOTSUP from session init
Date: Mon, 4 May 2020 13:05:58 +0000 [thread overview]
Message-ID: <BN8PR18MB2868DF7A3AFDB9E45CC0C3AEDFA60@BN8PR18MB2868.namprd18.prod.outlook.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>
> ---
> app/test/test_cryptodev_blockcipher.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/app/test/test_cryptodev_blockcipher.c
> b/app/test/test_cryptodev_blockcipher.c
> index 473dad9..5717194 100644
> --- a/app/test/test_cryptodev_blockcipher.c
> +++ b/app/test/test_cryptodev_blockcipher.c
> @@ -427,9 +427,11 @@
> 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)
> + 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-04 13:06 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 [this message]
2020-05-07 15:26 ` Ankur Dwivedi
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=BN8PR18MB2868DF7A3AFDB9E45CC0C3AEDFA60@BN8PR18MB2868.namprd18.prod.outlook.com \
--to=anoobj@marvell.com \
--cc=adwivedi@marvell.com \
--cc=akhil.goyal@nxp.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).