compress/qat: add configure and clear functions
[dpdk.git] / drivers / compress / qat / qat_comp_pmd.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2015-2018 Intel Corporation
3  */
4
5 #ifndef _QAT_COMP_PMD_H_
6 #define _QAT_COMP_PMD_H_
7
8 #ifdef RTE_LIBRTE_COMPRESSDEV
9
10 #include <rte_compressdev.h>
11 #include <rte_compressdev_pmd.h>
12
13 #include "qat_device.h"
14
15 /** private data structure for a QAT compression device.
16  * This QAT device is a device offering only a compression service,
17  * there can be one of these on each qat_pci_device (VF).
18  */
19 struct qat_comp_dev_private {
20         struct qat_pci_device *qat_dev;
21         /**< The qat pci device hosting the service */
22         struct rte_compressdev *compressdev;
23         /**< The pointer to this compression device structure */
24         const struct rte_memzone *interm_buff_mz;
25         /**< The device's memory for intermediate buffers */
26         struct rte_mempool *xformpool;
27         /**< The device's pool for qat_comp_xforms */
28
29 };
30
31 void
32 qat_comp_stats_reset(struct rte_compressdev *dev);
33
34 void
35 qat_comp_stats_get(struct rte_compressdev *dev,
36                 struct rte_compressdev_stats *stats);
37 int
38 qat_comp_qp_release(struct rte_compressdev *dev, uint16_t queue_pair_id);
39
40 int
41 qat_comp_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
42                   uint32_t max_inflight_ops, int socket_id);
43
44 int
45 qat_comp_dev_config(struct rte_compressdev *dev,
46                 struct rte_compressdev_config *config);
47
48 int
49 qat_comp_dev_close(struct rte_compressdev *dev);
50
51 #endif
52 #endif /* _QAT_COMP_PMD_H_ */