LCOV - code coverage report
Current view: top level - drivers/crypto/cnxk - cnxk_cryptodev.c (source / functions) Hit Total Coverage
Test: Code coverage Lines: 0 22 0.0 %
Date: 2025-01-02 22:41:34 Functions: 0 3 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 16 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  * Copyright(C) 2021 Marvell.
       3                 :            :  */
       4                 :            : 
       5                 :            : #include <cryptodev_pmd.h>
       6                 :            : #include <rte_cryptodev.h>
       7                 :            : 
       8                 :            : #include "roc_cpt.h"
       9                 :            : #include "roc_model.h"
      10                 :            : 
      11                 :            : #include "cnxk_cryptodev.h"
      12                 :            : 
      13                 :            : uint64_t
      14         [ #  # ]:          0 : cnxk_cpt_default_ff_get(void)
      15                 :            : {
      16                 :            :         uint64_t ff = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO | RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
      17                 :            :                       RTE_CRYPTODEV_FF_HW_ACCELERATED | RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT |
      18                 :            :                       RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP |
      19                 :            :                       RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING | RTE_CRYPTODEV_FF_IN_PLACE_SGL |
      20                 :            :                       RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT | RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
      21                 :            :                       RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT | RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
      22                 :            :                       RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED | RTE_CRYPTODEV_FF_SECURITY;
      23                 :            : 
      24         [ #  # ]:          0 :         if (roc_model_is_cn10k())
      25                 :            :                 ff |= RTE_CRYPTODEV_FF_SECURITY_INNER_CSUM | RTE_CRYPTODEV_FF_SYM_RAW_DP;
      26                 :            : 
      27   [ #  #  #  # ]:          0 :         if (roc_model_is_cn10ka_b0() || roc_model_is_cn10kb())
      28                 :          0 :                 ff |= RTE_CRYPTODEV_FF_SECURITY_RX_INJECT;
      29                 :            : 
      30                 :          0 :         return ff;
      31                 :            : }
      32                 :            : 
      33                 :            : int
      34                 :          0 : cnxk_cpt_eng_grp_add(struct roc_cpt *roc_cpt)
      35                 :            : {
      36                 :            :         int ret;
      37                 :            : 
      38                 :          0 :         ret = roc_cpt_eng_grp_add(roc_cpt, CPT_ENG_TYPE_SE);
      39         [ #  # ]:          0 :         if (ret < 0) {
      40                 :          0 :                 plt_err("Could not add CPT SE engines");
      41                 :          0 :                 return -ENOTSUP;
      42                 :            :         }
      43                 :            : 
      44                 :          0 :         ret = roc_cpt_eng_grp_add(roc_cpt, CPT_ENG_TYPE_IE);
      45         [ #  # ]:          0 :         if (ret < 0) {
      46                 :          0 :                 plt_err("Could not add CPT IE engines");
      47                 :          0 :                 return -ENOTSUP;
      48                 :            :         }
      49                 :            : 
      50                 :          0 :         ret = roc_cpt_eng_grp_add(roc_cpt, CPT_ENG_TYPE_AE);
      51         [ #  # ]:          0 :         if (ret < 0) {
      52                 :          0 :                 plt_err("Could not add CPT AE engines");
      53                 :          0 :                 return -ENOTSUP;
      54                 :            :         }
      55                 :            : 
      56                 :            :         return 0;
      57                 :            : }
      58                 :            : 
      59                 :            : void
      60                 :          0 : cnxk_cpt_int_misc_cb(struct roc_cpt_lf *lf, __rte_unused void *args)
      61                 :            : {
      62                 :          0 :         struct roc_cpt *roc_cpt = lf->roc_cpt;
      63                 :            : 
      64         [ #  # ]:          0 :         if (roc_cpt == NULL)
      65                 :            :                 return;
      66                 :            : 
      67                 :          0 :         rte_cryptodev_pmd_callback_process(roc_cpt->opaque, RTE_CRYPTODEV_EVENT_ERROR);
      68                 :            : }

Generated by: LCOV version 1.14