a00f3d696e282cadb4299404924eb5ff917233e7
[dpdk.git] / drivers / crypto / octeontx2 / otx2_cryptodev.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (C) 2019 Marvell International Ltd.
3  */
4
5 #ifndef _OTX2_CRYPTODEV_H_
6 #define _OTX2_CRYPTODEV_H_
7
8 #include "cpt_common.h"
9 #include "cpt_hw_types.h"
10
11 #include "otx2_dev.h"
12
13 /* Marvell OCTEON TX2 Crypto PMD device name */
14 #define CRYPTODEV_NAME_OCTEONTX2_PMD    crypto_octeontx2
15
16 #define OTX2_CPT_MAX_LFS                64
17 #define OTX2_CPT_MAX_QUEUES_PER_VF      64
18
19 /**
20  * Device private data
21  */
22 struct otx2_cpt_vf {
23         struct otx2_dev otx2_dev;
24         /**< Base class */
25         uint16_t max_queues;
26         /**< Max queues supported */
27         uint8_t nb_queues;
28         /**< Number of crypto queues attached */
29         uint16_t lf_msixoff[OTX2_CPT_MAX_LFS];
30         /**< MSI-X offsets */
31         uint8_t err_intr_registered:1;
32         /**< Are error interrupts registered? */
33         union cpt_eng_caps hw_caps[CPT_MAX_ENG_TYPES];
34         /**< CPT device capabilities */
35 };
36
37 struct cpt_meta_info {
38         uint64_t deq_op_info[4];
39         uint64_t comp_code_sz;
40         union cpt_res_s cpt_res __rte_aligned(16);
41         struct cpt_request_info cpt_req;
42 };
43
44 #define CPT_LOGTYPE otx2_cpt_logtype
45
46 extern int otx2_cpt_logtype;
47
48 /*
49  * Crypto device driver ID
50  */
51 extern uint8_t otx2_cryptodev_driver_id;
52
53 #endif /* _OTX2_CRYPTODEV_H_ */