From: Archana Muniganti <marchana@marvell.com>
To: <gakhil@marvell.com>
Cc: Archana Muniganti <marchana@marvell.com>, <ktejasree@marvell.com>,
<adwivedi@marvell.com>, <anoobj@marvell.com>,
<jerinj@marvell.com>, <dev@dpdk.org>,
Vamsi Attunuru <vattunuru@marvell.com>
Subject: [dpdk-dev] [PATCH v2 1/6] crypto/cnxk: add cn9k security ctx
Date: Tue, 7 Sep 2021 19:50:58 +0530 [thread overview]
Message-ID: <20210907142103.18807-2-marchana@marvell.com> (raw)
In-Reply-To: <20210907142103.18807-1-marchana@marvell.com>
Add security ctx in cn9k crypto PMD.
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
drivers/crypto/cnxk/cn9k_cryptodev.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
index 9ff2383d98..db2e085161 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
@@ -14,6 +14,7 @@
#include "cn9k_cryptodev_ops.h"
#include "cnxk_cryptodev.h"
#include "cnxk_cryptodev_capabilities.h"
+#include "cnxk_cryptodev_sec.h"
#include "roc_api.h"
@@ -77,6 +78,11 @@ cn9k_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
plt_err("Failed to add engine group rc=%d", rc);
goto dev_fini;
}
+
+ /* Create security context */
+ rc = cnxk_crypto_sec_ctx_create(dev);
+ if (rc)
+ goto dev_fini;
}
dev->dev_ops = &cn9k_cpt_ops;
@@ -117,6 +123,9 @@ cn9k_cpt_pci_remove(struct rte_pci_device *pci_dev)
if (dev == NULL)
return -ENODEV;
+ /* Destroy security context */
+ cnxk_crypto_sec_ctx_destroy(dev);
+
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
vf = dev->data->dev_private;
ret = roc_cpt_dev_fini(&vf->cpt);
--
2.22.0
next prev parent reply other threads:[~2021-09-07 14:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 14:20 [dpdk-dev] [PATCH v2 0/6] add cn9k lookaside IPsec support Archana Muniganti
2021-09-07 14:20 ` Archana Muniganti [this message]
2021-09-07 14:20 ` [dpdk-dev] [PATCH v2 2/6] common/cnxk: add cn9k IPsec microcode defines Archana Muniganti
2021-09-07 14:21 ` [dpdk-dev] [PATCH v2 3/6] crypto/cnxk: add cn9k security session ops Archana Muniganti
2021-09-07 14:21 ` [dpdk-dev] [PATCH v2 4/6] crypto/cnxk: add cn9k lookaside IPsec datapath Archana Muniganti
2021-09-07 14:21 ` [dpdk-dev] [PATCH v2 5/6] crypto/cnxk: update tailroom requirement Archana Muniganti
2021-09-07 14:21 ` [dpdk-dev] [PATCH v2 6/6] crypto/cnxk: update feature flag for cn9k lookaside IPsec Archana Muniganti
2021-09-07 16:02 ` [dpdk-dev] [PATCH v2 0/6] add cn9k lookaside IPsec support Anoob Joseph
2021-09-07 18:22 ` 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=20210907142103.18807-2-marchana@marvell.com \
--to=marchana@marvell.com \
--cc=adwivedi@marvell.com \
--cc=anoobj@marvell.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=jerinj@marvell.com \
--cc=ktejasree@marvell.com \
--cc=vattunuru@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).