0535bc66b80c9130b90e440358e4de54dc962bb6
[dpdk.git] / drivers / crypto / qat / qat_asym_pmd.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2019 Intel Corporation
3  */
4
5
6 #ifndef _QAT_ASYM_PMD_H_
7 #define _QAT_ASYM_PMD_H_
8
9 #include <rte_cryptodev.h>
10 #include "qat_device.h"
11
12 /** Intel(R) QAT Asymmetric Crypto PMD driver name */
13 #define CRYPTODEV_NAME_QAT_ASYM_PMD     crypto_qat_asym
14
15
16 extern uint8_t cryptodev_qat_asym_driver_id;
17
18 /** private data structure for a QAT device.
19  * This QAT device is a device offering only asymmetric crypto service,
20  * there can be one of these on each qat_pci_device (VF).
21  */
22 struct qat_asym_dev_private {
23         struct qat_pci_device *qat_dev;
24         /**< The qat pci device hosting the service */
25         uint8_t asym_dev_id;
26         /**< Device instance for this rte_cryptodev */
27         const struct rte_cryptodev_capabilities *qat_dev_capabilities;
28         /* QAT device asymmetric crypto capabilities */
29         uint16_t min_enq_burst_threshold;
30 };
31
32 uint16_t
33 qat_asym_pmd_enqueue_op_burst(void *qp, struct rte_crypto_op **ops,
34                               uint16_t nb_ops);
35
36 uint16_t
37 qat_asym_pmd_dequeue_op_burst(void *qp, struct rte_crypto_op **ops,
38                               uint16_t nb_ops);
39
40 int qat_asym_session_configure(struct rte_cryptodev *dev,
41                 struct rte_crypto_asym_xform *xform,
42                 struct rte_cryptodev_asym_session *sess,
43                 struct rte_mempool *mempool);
44
45 int
46 qat_asym_dev_create(struct qat_pci_device *qat_pci_dev,
47                 struct qat_dev_cmd_param *qat_dev_cmd_param);
48
49 int
50 qat_asym_dev_destroy(struct qat_pci_device *qat_pci_dev);
51
52 #endif /* _QAT_ASYM_PMD_H_ */