From: Ankur Dwivedi Date: Thu, 8 Oct 2020 12:52:33 +0000 (+0530) Subject: test/event: fix function arguments for crypto adapter X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=45eb85e9bff1c03cf72fb2ff9722757b64d47735;p=dpdk.git test/event: fix function arguments for crypto adapter 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. Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test") Cc: stable@dpdk.org Signed-off-by: Ankur Dwivedi Acked-by: Abhinandan Gujjar --- diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index db9d75d3ff..37bcbecd47 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -201,8 +201,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) { @@ -288,7 +288,7 @@ test_sessionless_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) && @@ -313,7 +313,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) && @@ -394,8 +394,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) { @@ -444,7 +444,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) && @@ -470,7 +470,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) && @@ -692,7 +692,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"); @@ -705,7 +705,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) {