DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ankur Dwivedi <adwivedi@marvell.com>
To: <dev@dpdk.org>
Cc: <gakhil@marvell.com>, <anoobj@marvell.com>,
	<ktejasree@marvell.com>, <jerinj@marvell.com>,
	Ankur Dwivedi <adwivedi@marvell.com>
Subject: [dpdk-dev] [PATCH 2/2] crypto/cnxk: add dev start and dev stop
Date: Thu, 8 Jul 2021 17:17:14 +0530	[thread overview]
Message-ID: <20210708114714.32623-3-adwivedi@marvell.com> (raw)
In-Reply-To: <20210708114714.32623-1-adwivedi@marvell.com>

The instruction queue is enabled in dev start and is disabled in
dev stop.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 7322539a17..7d8d98e7ec 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -95,7 +95,13 @@ cnxk_cpt_dev_config(struct rte_cryptodev *dev,
 int
 cnxk_cpt_dev_start(struct rte_cryptodev *dev)
 {
-	RTE_SET_USED(dev);
+	struct cnxk_cpt_vf *vf = dev->data->dev_private;
+	struct roc_cpt *roc_cpt = &vf->cpt;
+	uint16_t nb_lf = roc_cpt->nb_lf;
+	uint16_t qp_id;
+
+	for (qp_id = 0; qp_id < nb_lf; qp_id++)
+		roc_cpt_iq_enable(roc_cpt->lf[qp_id]);
 
 	return 0;
 }
@@ -103,7 +109,13 @@ cnxk_cpt_dev_start(struct rte_cryptodev *dev)
 void
 cnxk_cpt_dev_stop(struct rte_cryptodev *dev)
 {
-	RTE_SET_USED(dev);
+	struct cnxk_cpt_vf *vf = dev->data->dev_private;
+	struct roc_cpt *roc_cpt = &vf->cpt;
+	uint16_t nb_lf = roc_cpt->nb_lf;
+	uint16_t qp_id;
+
+	for (qp_id = 0; qp_id < nb_lf; qp_id++)
+		roc_cpt_iq_disable(roc_cpt->lf[qp_id]);
 }
 
 int
-- 
2.28.0


  parent reply	other threads:[~2021-07-08 11:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 11:47 [dpdk-dev] [PATCH 0/2] add dev start and dev stop ops in cnxk crypto PMD Ankur Dwivedi
2021-07-08 11:47 ` [dpdk-dev] [PATCH 1/2] common/cnxk: move instruction queue enable to roc API Ankur Dwivedi
2021-07-08 11:47 ` Ankur Dwivedi [this message]
2021-07-18  7:45 ` [dpdk-dev] [PATCH 0/2] add dev start and dev stop ops in cnxk crypto PMD Akhil Goyal

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=20210708114714.32623-3-adwivedi@marvell.com \
    --to=adwivedi@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=ktejasree@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).