eventdev/crypto: add cryptodev start in adapter spec
authorShijith Thotton <sthotton@marvell.com>
Fri, 3 Sep 2021 06:39:28 +0000 (12:09 +0530)
committerJerin Jacob <jerinj@marvell.com>
Thu, 21 Oct 2021 08:14:50 +0000 (10:14 +0200)
Event crypto adapter spec does not mention about cryptodev start and
stop. Cryptodev attached to the adapter should be started before calling
crypto adapter start. Added the same in spec and test application.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
app/test/test_event_crypto_adapter.c
lib/eventdev/rte_event_crypto_adapter.h

index 0c7ebe6..3d7e9fb 100644 (file)
@@ -801,6 +801,10 @@ test_crypto_adapter_stop(void)
                rte_service_runstate_set(evdev_service_id, 0);
                rte_service_lcore_stop(slcore_id);
                rte_service_lcore_del(slcore_id);
+               rte_cryptodev_stop(TEST_CDEV_ID);
+               rte_event_dev_stop(evdev);
+       } else {
+               rte_cryptodev_stop(TEST_CDEV_ID);
                rte_event_dev_stop(evdev);
        }
 }
@@ -848,6 +852,10 @@ test_crypto_adapter_conf(enum rte_event_crypto_adapter_mode mode)
        TEST_ASSERT_SUCCESS(rte_event_dev_start(evdev),
                                "Failed to start event device");
 
+       /* start the cryptodev */
+       TEST_ASSERT_SUCCESS(rte_cryptodev_start(TEST_CDEV_ID),
+                               "Failed to start crypto device");
+
        return TEST_SUCCESS;
 }
 
index 30596ed..edbd5c6 100644 (file)
@@ -440,8 +440,8 @@ rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id,
  *  - <0: Error code on failure.
  *
  * @note
- *  The eventdev to which the event_crypto_adapter is connected needs to
- *  be started before calling rte_event_crypto_adapter_start().
+ *  The eventdev and cryptodev to which the event_crypto_adapter is connected
+ *  needs to be started before calling rte_event_crypto_adapter_start().
  */
 int
 rte_event_crypto_adapter_start(uint8_t id);