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 02BE5A0C43; Wed, 20 Oct 2021 13:28:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 598DE41203; Wed, 20 Oct 2021 13:28:45 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 4243C411F3 for ; Wed, 20 Oct 2021 13:28:43 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19KBCiPm015069; Wed, 20 Oct 2021 04:28:36 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=tbFnutcqeHU2IL7BrGrXM3mlivULTlS2a0V7Jz8JOwg=; b=GNFOGQHQAH7XHR0FSBrrmLeRE1b+ArLN+oE65xxnRSZ/gOqpa0TlEPn4lJQ3gLQTj5IJ RpOivhVo9oceAgWNd/ZMznRuCMAi1ZQs5DGa2dvub4CTj1BoyhXWv3orKfUxJqsgzCRh tX+NJ5VemwN8ja/L1zeL49TRnlPF4zZ5VBGu59Ko0ttLIbt/pCS92Ubp4RiAVnh7eKGL WwI6T+Q74nHkR42xIdeb7Me0WaozmGm2whPDVZpipwkYBwWy0tws7uzzeOtqeYeJYt+Q eD0Oo+KQ845dYw2FhLUsyQ29w2jKSe4hlvnh0o3hxzcIg1cHro/PzqL2r7A+ZOFvSeLh ww== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3btaa7a4sa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 20 Oct 2021 04:28:36 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 20 Oct 2021 04:28:34 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Wed, 20 Oct 2021 04:28:34 -0700 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id 7F4333F7080; Wed, 20 Oct 2021 04:28:28 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , , , , , , , , , , Akhil Goyal Date: Wed, 20 Oct 2021 16:57:50 +0530 Message-ID: <20211020112754.1270163-5-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020112754.1270163-1-gakhil@marvell.com> References: <20211018144201.2028022-1-gakhil@marvell.com> <20211020112754.1270163-1-gakhil@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: KoZp_J-EoBOSgbLcEn9RgtNroJAjKjE3 X-Proofpoint-GUID: KoZp_J-EoBOSgbLcEn9RgtNroJAjKjE3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-20_04,2021-10-20_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH v4 4/8] crypto/scheduler: use proper API for device start/stop 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" The worker PMDs were using direct device start/stop functions rather than rte_cryptodev_start(), so rte_crypto_fp_ops never get set. This patch calls the rte_cryptodev_start and stop APIs which start and stop devices properly and fp_ops get set. Reported-by: Ciara Power Signed-off-by: Akhil Goyal --- drivers/crypto/scheduler/scheduler_pmd_ops.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c index 465b88ade8..f61640c9d6 100644 --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c @@ -181,10 +181,7 @@ scheduler_pmd_start(struct rte_cryptodev *dev) /* start all workers */ for (i = 0; i < sched_ctx->nb_workers; i++) { uint8_t worker_dev_id = sched_ctx->workers[i].dev_id; - struct rte_cryptodev *worker_dev = - rte_cryptodev_pmd_get_dev(worker_dev_id); - - ret = (*worker_dev->dev_ops->dev_start)(worker_dev); + ret = rte_cryptodev_start(worker_dev_id); if (ret < 0) { CR_SCHED_LOG(ERR, "Failed to start worker dev %u", worker_dev_id); @@ -208,10 +205,8 @@ scheduler_pmd_stop(struct rte_cryptodev *dev) /* stop all workers first */ for (i = 0; i < sched_ctx->nb_workers; i++) { uint8_t worker_dev_id = sched_ctx->workers[i].dev_id; - struct rte_cryptodev *worker_dev = - rte_cryptodev_pmd_get_dev(worker_dev_id); - (*worker_dev->dev_ops->dev_stop)(worker_dev); + rte_cryptodev_stop(worker_dev_id); } if (*sched_ctx->ops.scheduler_stop) -- 2.25.1