0f58a76c4fab8e22f09f0cae74296007b04376d0
[dpdk.git] / drivers / compress / qat / qat_comp.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2015-2018 Intel Corporation
3  */
4
5 #ifndef _QAT_COMP_H_
6 #define _QAT_COMP_H_
7
8 #ifdef RTE_LIBRTE_COMPRESSDEV
9
10 #include <rte_compressdev.h>
11 #include <rte_compressdev_pmd.h>
12
13 #include "icp_qat_hw.h"
14 #include "icp_qat_fw_comp.h"
15 #include "icp_qat_fw_la.h"
16
17 enum qat_comp_request_type {
18         QAT_COMP_REQUEST_FIXED_COMP_STATELESS,
19         QAT_COMP_REQUEST_DYNAMIC_COMP_STATELESS,
20         QAT_COMP_REQUEST_DECOMPRESS,
21         REQ_COMP_END
22 };
23
24
25 struct qat_comp_xform {
26         struct icp_qat_fw_comp_req qat_comp_req_tmpl;
27         enum qat_comp_request_type qat_comp_request_type;
28         enum rte_comp_checksum_type checksum_type;
29 };
30
31
32 int
33 qat_comp_private_xform_create(struct rte_compressdev *dev,
34                               const struct rte_comp_xform *xform,
35                               void **private_xform);
36
37 int
38 qat_comp_private_xform_free(struct rte_compressdev *dev, void *private_xform);
39
40 unsigned int
41 qat_comp_xform_size(void);
42
43 #endif
44 #endif