DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shijith Thotton <sthotton@marvell.com>
To: <dev@dpdk.org>
Cc: Shijith Thotton <sthotton@marvell.com>, <jerinj@marvell.com>,
	<anoobj@marvell.com>, <pbhagavatula@marvell.com>,
	<gakhil@marvell.com>,
	Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Subject: [dpdk-dev] [PATCH] eventdev: cryptodev start in crypto adapter spec
Date: Fri, 3 Sep 2021 12:09:28 +0530	[thread overview]
Message-ID: <8e348648483680699bd9d5e89d063e2cc31bc86a.1630650491.git.sthotton@marvell.com> (raw)

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(-)

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);
-- 
2.25.1


             reply	other threads:[~2021-09-03  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03  6:39 Shijith Thotton [this message]
2021-09-03  6:41 ` Akhil Goyal
2021-09-06 14:51   ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e348648483680699bd9d5e89d063e2cc31bc86a.1630650491.git.sthotton@marvell.com \
    --to=sthotton@marvell.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=pbhagavatula@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).