eventdev: cryptodev start in crypto adapter spec

Message ID 8e348648483680699bd9d5e89d063e2cc31bc86a.1630650491.git.sthotton@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series eventdev: cryptodev start in crypto adapter spec |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS

Commit Message

Shijith Thotton Sept. 3, 2021, 6:39 a.m. UTC
  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>
---
 app/test/test_event_crypto_adapter.c    | 8 ++++++++
 lib/eventdev/rte_event_crypto_adapter.h | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)
  

Comments

Akhil Goyal Sept. 3, 2021, 6:41 a.m. UTC | #1
> 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>
  
Jerin Jacob Sept. 6, 2021, 2:51 p.m. UTC | #2
On Fri, Sep 3, 2021 at 12:12 PM Akhil Goyal <gakhil@marvell.com> wrote:
>
> > 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>

Applied to dpdk-next-net-eventdev/for-main. Thanks
  

Patch

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 3ad20921e2..279aa3abf5 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -804,6 +804,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);
 	}
 }
@@ -851,6 +855,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;
 }
 
diff --git a/lib/eventdev/rte_event_crypto_adapter.h b/lib/eventdev/rte_event_crypto_adapter.h
index f8c6cca87c..27fb628eef 100644
--- a/lib/eventdev/rte_event_crypto_adapter.h
+++ b/lib/eventdev/rte_event_crypto_adapter.h
@@ -439,8 +439,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);