From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C035BA0C53; Fri, 3 Sep 2021 08:39:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56F00406B4; Fri, 3 Sep 2021 08:39:54 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 2E6894013F for ; Fri, 3 Sep 2021 08:39:53 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 182JBY2H011170; Thu, 2 Sep 2021 23:39:52 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=rHemU84Evcx1JYwTd7k3DNOZjBBmz8GOQj6Z8oRNO7g=; b=Q42YpHon3zAPLgHuSlqJReUVEM0NSZhL6nnlLxnDFkgsweAeqSwSEwd05XlJbCSE2SyX 6AnNOr2YjxCkmaAUOPgTV/eE3szER0+82JGKte1tOoCJMfAFj3fLPiN3y3tShNuy+bCC o9Ke01FCKpOixD0MLx6CnHEug9I7j/HMdIPy245E/AmKUpskp4ElCtbsxyrORdiAlnDP uPQdVGsb25OpsNrGXooaPM96BdqGUpKJ6fmZwO4/2zHFF/y3D6QCQkElntIgnCZmWi7U z32SL/R5YO+pqE2eN6mafVaBjX66s9XXitM3wvg3zmGb1gPKQWE+Je3xeCDEDaJJhn0R Qg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3attqmmpas-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Sep 2021 23:39:52 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 2 Sep 2021 23:39:44 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 2 Sep 2021 23:39:44 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 71E5A5B6942; Thu, 2 Sep 2021 23:39:42 -0700 (PDT) From: Shijith Thotton To: CC: Shijith Thotton , , , , , Abhinandan Gujjar Date: Fri, 3 Sep 2021 12:09:28 +0530 Message-ID: <8e348648483680699bd9d5e89d063e2cc31bc86a.1630650491.git.sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: wBwm_kzb_qcF73E2uhp-Swk8SKUImEOG X-Proofpoint-ORIG-GUID: wBwm_kzb_qcF73E2uhp-Swk8SKUImEOG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-03_02,2021-09-03_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH] eventdev: cryptodev start in crypto adapter spec X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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