From patchwork Fri Sep 25 07:28:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Dwivedi X-Patchwork-Id: 78794 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3BACFA04C3; Fri, 25 Sep 2020 09:29:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 298481E543; Fri, 25 Sep 2020 09:29:20 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id B03F41E54E for ; Fri, 25 Sep 2020 09:29:18 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08P7Qvad003792; Fri, 25 Sep 2020 00:29:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=U61g9Df2ZCdB6s8X31KwYK4TbWhH62OsWELVQcEmWkw=; b=FSqPml3d+ItPBo41YjQZjqWUl8BBLjHIU389ZEKV+Zb1jTE7RODptEuJjcYX71Zs0gG3 4LLEgoATNeJioZfGc9v5WKQqX/Z0hAcMyK1TwxnQHcWPbOkh29iVR9qAqXkj4YDLINzk 3ozw9GgQnvSJk4ZN6Z+tvrnuP2LMsYK5BL5yHuyJ40XADEukQJ4pqqxl8ay16s/gia/1 QCLejwBHAZ7+2DUiv5aa6T0vXGmJ30edmgFD8o1BfcgdJFpGwu2TaLai2q/NqfkU7tT+ +5W9l6V9QSQo9bQ3o2f/Iyc1P6BV4iY5LqAMQLszxgAg+PeftMIH8xPHjl6OMDgjgf0X 1Q== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 33nfbq9u2q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 25 Sep 2020 00:29:17 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 25 Sep 2020 00:29:16 -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.2; Fri, 25 Sep 2020 00:29:16 -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.2 via Frontend Transport; Fri, 25 Sep 2020 00:29:15 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 158C63F7044; Fri, 25 Sep 2020 00:29:13 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi Date: Fri, 25 Sep 2020 12:58:40 +0530 Message-ID: <20200925072841.17578-3-adwivedi@marvell.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200925072841.17578-1-adwivedi@marvell.com> References: <20200908091534.24305-1-adwivedi@marvell.com> <20200925072841.17578-1-adwivedi@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-25_02:2020-09-24, 2020-09-25 signatures=0 Subject: [dpdk-dev] [PATCH v2 2/3] test/event_crypto_adapter: fix function arguments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The arguments passed to rte_event_crypto_adapter_caps_get() and rte_event_crypto_adapter_create() are incorrect. In the rte_event_crypto_adapter_caps_get(), event device id should be the first argument and cryptodev id should be the second argument. In the rte_event_crypto_adapter_create(), the event device id should be the second argument. Signed-off-by: Ankur Dwivedi --- app/test/test_event_crypto_adapter.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 3c64742b3..572ef9c27 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -209,8 +209,8 @@ test_op_forward_mode(uint8_t session_less) &cipher_xform, params.session_priv_mpool); TEST_ASSERT_SUCCESS(ret, "Failed to init session\n"); - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, - evdev, &cap); + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, + &cap); TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { @@ -321,7 +321,7 @@ test_session_with_op_forward_mode(void) uint32_t cap; int ret; - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap); + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && @@ -410,8 +410,8 @@ test_op_new_mode(uint8_t session_less) params.session_mpool); TEST_ASSERT_NOT_NULL(sess, "Session creation failed\n"); - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, - evdev, &cap); + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, + &cap); TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { @@ -460,7 +460,7 @@ test_sessionless_with_op_new_mode(void) uint32_t cap; int ret; - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap); + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && @@ -486,7 +486,7 @@ test_session_with_op_new_mode(void) uint32_t cap; int ret; - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap); + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && @@ -706,7 +706,7 @@ test_crypto_adapter_create(void) /* Create adapter with default port creation callback */ ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID, - TEST_CDEV_ID, + evdev, &conf, 0); TEST_ASSERT_SUCCESS(ret, "Failed to create event crypto adapter\n"); @@ -719,7 +719,7 @@ test_crypto_adapter_qp_add_del(void) uint32_t cap; int ret; - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap); + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) {