From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: Akhil Goyal <gakhil@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "ciara.power@intel.com" <ciara.power@intel.com>,
"fanzhang.oss@gmail.com" <fanzhang.oss@gmail.com>,
"anoobj@marvell.com" <anoobj@marvell.com>
Subject: RE: [PATCH] app/crypto-perf: return ENOTSUP for unsupported cases
Date: Mon, 31 Jul 2023 05:10:48 +0000 [thread overview]
Message-ID: <PAXPR04MB93280A959CA262A66E1C04AF8905A@PAXPR04MB9328.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20230731035221.932405-1-gakhil@marvell.com>
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
>
> dpdk-test-crypto-perf application returns failure for all the cases which are
> not supported by the device.
>
> This patch captures rte_errno to check if the case run is supported or not, if
> not supported, the application would now return ENOTSUP which can be
> used in automation to identify between failed and unsupported cases.
>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> ---
> app/test-crypto-perf/main.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index
> bc1f0f9659..6a2e5762a3 100644
> --- a/app/test-crypto-perf/main.c
> +++ b/app/test-crypto-perf/main.c
> @@ -9,6 +9,7 @@
> #include <rte_malloc.h>
> #include <rte_random.h>
> #include <rte_eal.h>
> +#include <rte_errno.h>
> #include <rte_cryptodev.h>
> #ifdef RTE_CRYPTO_SCHEDULER
> #include <rte_cryptodev_scheduler.h>
> @@ -560,6 +561,7 @@ main(int argc, char **argv)
>
> int ret;
> uint32_t lcore_id;
> + bool cap_unsupported = false;
>
> /* Initialise DPDK EAL */
> ret = rte_eal_init(argc, argv);
> @@ -600,6 +602,7 @@ main(int argc, char **argv)
> if (ret) {
> RTE_LOG(ERR, USER1, "Crypto device type does not support
> "
> "capabilities requested\n");
> + cap_unsupported = true;
> goto err;
> }
>
> @@ -819,6 +822,10 @@ main(int argc, char **argv)
> rte_free(opts.imix_buffer_sizes);
> free_test_vector(t_vec, &opts);
>
> + if (rte_errno == ENOTSUP || cap_unsupported) {
> + RTE_LOG(ERR, USER1, "Unsupported case: errno: %u\n",
> rte_errno);
> + return -ENOTSUP;
> + }
> printf("\n");
> return EXIT_FAILURE;
> }
> --
> 2.25.1
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
next prev parent reply other threads:[~2023-07-31 5:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 3:52 Akhil Goyal
2023-07-31 5:10 ` Hemant Agrawal [this message]
2023-09-06 8:26 ` 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=PAXPR04MB93280A959CA262A66E1C04AF8905A@PAXPR04MB9328.eurprd04.prod.outlook.com \
--to=hemant.agrawal@nxp.com \
--cc=anoobj@marvell.com \
--cc=ciara.power@intel.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=gakhil@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).