From patchwork Mon Jul 31 03:52:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 129731 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C072442F95; Mon, 31 Jul 2023 05:52:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5941B40A89; Mon, 31 Jul 2023 05:52:30 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 1340540150 for ; Mon, 31 Jul 2023 05:52:28 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36ULMutI027932; Sun, 30 Jul 2023 20:52:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=OPV8RvimnqrC87kitplmN5zWGDetphwTAzkh9lu6ezg=; b=I/z2eIa5ZysP+bdfiXMjZCb8Zm23R38Nx+zlGLkBkY3stJLSNMuzylIJWD9/BFyDRi/q 8hgsFJ33Ne6Dlz3pZncPGtvHYiTXUDwI8eB3UwMOmUrgUaKnYO+kWMedZr1iEg+rNKCr 8MHB44a6jn8XoCulaMe447xFqgL6HvJBfhKFeZWHBZHPOYNJE/xIQqAB83xK17jGOH5p TXe0DLizlSjK6W96xmjnn14GdZXG7ugOxFlA2A38EdYrXI7WxESp3q8hZ+ju8KhdQ3la 6cFohJxNhxRiA059LfyesH9tN0kzAHT+xeXtKaCkhBr4T4diXvKD6isBL7k1nIFGhaEW NA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3s504nm57j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 30 Jul 2023 20:52:28 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 30 Jul 2023 20:52:26 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sun, 30 Jul 2023 20:52:26 -0700 Received: from localhost.localdomain (unknown [10.28.36.102]) by maili.marvell.com (Postfix) with ESMTP id 128723F70B7; Sun, 30 Jul 2023 20:52:23 -0700 (PDT) From: Akhil Goyal To: CC: , , , , Akhil Goyal Subject: [PATCH] app/crypto-perf: return ENOTSUP for unsupported cases Date: Mon, 31 Jul 2023 09:22:21 +0530 Message-ID: <20230731035221.932405-1-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 5avIbcHbkn9PXCUVghgU1YABUMdzkz4p X-Proofpoint-GUID: 5avIbcHbkn9PXCUVghgU1YABUMdzkz4p X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-27_10,2023-07-26_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Acked-by: Hemant Agrawal --- 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 #include #include +#include #include #ifdef RTE_CRYPTO_SCHEDULER #include @@ -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; }