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 <gak...@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