crypto/octeontx2: move capabilities init into probe
[dpdk.git] / drivers / crypto / qat / qat_sym_pmd.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2015-2018 Intel Corporation
3  */
4
5 #ifndef _QAT_SYM_PMD_H_
6 #define _QAT_SYM_PMD_H_
7
8 #ifdef BUILD_QAT_SYM
9
10 #include <rte_ether.h>
11 #include <rte_cryptodev.h>
12 #ifdef RTE_LIBRTE_SECURITY
13 #include <rte_security.h>
14 #endif
15
16 #include "qat_sym_capabilities.h"
17 #include "qat_device.h"
18
19 /** Intel(R) QAT Symmetric Crypto PMD driver name */
20 #define CRYPTODEV_NAME_QAT_SYM_PMD      crypto_qat
21
22 /* Internal capabilities */
23 #define QAT_SYM_CAP_MIXED_CRYPTO        (1 << 0)
24 #define QAT_SYM_CAP_VALID               (1 << 31)
25
26 extern uint8_t qat_sym_driver_id;
27
28 /** private data structure for a QAT device.
29  * This QAT device is a device offering only symmetric crypto service,
30  * there can be one of these on each qat_pci_device (VF).
31  */
32 struct qat_sym_dev_private {
33         struct qat_pci_device *qat_dev;
34         /**< The qat pci device hosting the service */
35         uint8_t sym_dev_id;
36         /**< Device instance for this rte_cryptodev */
37         const struct rte_cryptodev_capabilities *qat_dev_capabilities;
38         /* QAT device symmetric crypto capabilities */
39         const struct rte_memzone *capa_mz;
40         /* Shared memzone for storing capabilities */
41         uint16_t min_enq_burst_threshold;
42         uint32_t internal_capabilities; /* see flags QAT_SYM_CAP_xxx */
43 };
44
45 int
46 qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
47                 struct qat_dev_cmd_param *qat_dev_cmd_param);
48
49 int
50 qat_sym_dev_destroy(struct qat_pci_device *qat_pci_dev);
51
52 #endif
53 #endif /* _QAT_SYM_PMD_H_ */