net/i40e/base: fix potentially uninitialized variables
[dpdk.git] / drivers / crypto / cnxk / cnxk_cryptodev.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2021 Marvell.
3  */
4
5 #include <rte_cryptodev.h>
6
7 #include "roc_cpt.h"
8
9 #include "cnxk_cryptodev.h"
10
11 uint64_t
12 cnxk_cpt_default_ff_get(void)
13 {
14         uint64_t ff = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
15                       RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
16                       RTE_CRYPTODEV_FF_HW_ACCELERATED |
17                       RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT |
18                       RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
19                       RTE_CRYPTODEV_FF_IN_PLACE_SGL |
20                       RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
21                       RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
22                       RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
23                       RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
24                       RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED |
25                       RTE_CRYPTODEV_FF_SECURITY;
26
27         if (roc_model_is_cn10k())
28                 ff |= RTE_CRYPTODEV_FF_SECURITY_INNER_CSUM;
29
30         return ff;
31 }
32
33 int
34 cnxk_cpt_eng_grp_add(struct roc_cpt *roc_cpt)
35 {
36         int ret;
37
38         ret = roc_cpt_eng_grp_add(roc_cpt, CPT_ENG_TYPE_SE);
39         if (ret < 0) {
40                 plt_err("Could not add CPT SE engines");
41                 return -ENOTSUP;
42         }
43
44         ret = roc_cpt_eng_grp_add(roc_cpt, CPT_ENG_TYPE_IE);
45         if (ret < 0) {
46                 plt_err("Could not add CPT IE engines");
47                 return -ENOTSUP;
48         }
49
50         ret = roc_cpt_eng_grp_add(roc_cpt, CPT_ENG_TYPE_AE);
51         if (ret < 0) {
52                 plt_err("Could not add CPT AE engines");
53                 return -ENOTSUP;
54         }
55
56         return 0;
57 }