Thread (24 messages) 24 messages, 2 authors, 2021-06-29

Re: [dpdk-dev] [PATCH 1/4] crypto/cnxk: add security ctx skeleton

From: Akhil Goyal <hidden>
Date: 2021-06-16 20:14:45

quoted hunk ↗ jump to hunk
From: Srujana Challa <schalla@marvell.com>

Add security ctx in cn10k crypto PMD.

Signed-off-by: Anoob Joseph <redacted>
Signed-off-by: Srujana Challa <schalla@marvell.com>
Signed-off-by: Tejasree Kondoj <redacted>
---
 drivers/crypto/cnxk/cn10k_cryptodev.c    | 10 +++++++
 drivers/crypto/cnxk/cnxk_cryptodev_sec.c | 47
++++++++++++++++++++++++++++++++
 drivers/crypto/cnxk/cnxk_cryptodev_sec.h | 14 ++++++++++
 drivers/crypto/cnxk/meson.build          |  3 +-
 4 files changed, 73 insertions(+), 1 deletion(-)
 create mode 100644 drivers/crypto/cnxk/cnxk_cryptodev_sec.c
 create mode 100644 drivers/crypto/cnxk/cnxk_cryptodev_sec.h
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c
b/drivers/crypto/cnxk/cn10k_cryptodev.c
index ca3adea..b58d390 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
@@ -14,6 +14,7 @@
 #include "cn10k_cryptodev_ops.h"
 #include "cnxk_cryptodev.h"
 #include "cnxk_cryptodev_capabilities.h"
+#include "cnxk_cryptodev_sec.h"

 #include "roc_api.h"
@@ -75,6 +76,11 @@ cn10k_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;
 	}

 	cnxk_cpt_caps_populate(vf);
@@ -87,6 +93,7 @@ cn10k_cpt_pci_probe(struct rte_pci_driver *pci_drv
__rte_unused,
 			     RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
 			     RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
 			     RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
+			     RTE_CRYPTODEV_FF_SECURITY |
 			     RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED;
Corresponding change in .ini file missing. Moreover, you should add it in
Last patch of this series when your feature is complete.
Both feature flag and documentation in .ini should be in same patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help