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

Akhil Goyal gakhil at marvell.com
Wed Jun 16 22:14:39 CEST 2021


> From: Srujana Challa <schalla at marvell.com>
> 
> Add security ctx in cn10k crypto PMD.
> 
> Signed-off-by: Anoob Joseph <anoobj at marvell.com>
> Signed-off-by: Srujana Challa <schalla at marvell.com>
> Signed-off-by: Tejasree Kondoj <ktejasree at marvell.com>
> ---
>  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.


More information about the dev mailing list