test/event_crypto: no service core when HW support available
authorHemant Agrawal <hemant.agrawal@nxp.com>
Fri, 6 Sep 2019 10:44:34 +0000 (16:14 +0530)
committerJerin Jacob <jerinj@marvell.com>
Sat, 5 Oct 2019 13:39:31 +0000 (15:39 +0200)
If HW support is available, service core shall not come
into play by default. This shall be for both FWD/NEW modes.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
app/test/test_event_crypto_adapter.c

index e7bf809..ed8a58d 100644 (file)
@@ -293,7 +293,8 @@ test_sessionless_with_op_forward_mode(void)
        ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap);
        TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
-       if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD))
+       if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
+           !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
                map_adapter_service_core();
 
        TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID),
@@ -313,7 +314,8 @@ test_session_with_op_forward_mode(void)
        ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap);
        TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
-       if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD))
+       if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
+           !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
                map_adapter_service_core();
 
        TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID
@@ -441,7 +443,7 @@ test_sessionless_with_op_new_mode(void)
        ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap);
        TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
-       if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) ||
+       if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
            !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
                map_adapter_service_core();
 
@@ -463,7 +465,7 @@ test_session_with_op_new_mode(void)
        ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap);
        TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
-       if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) ||
+       if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
            !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
                map_adapter_service_core();