compress/qat: create FW request and process response
[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 "qat_common.h"
14 #include "icp_qat_hw.h"
15 #include "icp_qat_fw_comp.h"
16 #include "icp_qat_fw_la.h"
17
18 enum qat_comp_request_type {
19         QAT_COMP_REQUEST_FIXED_COMP_STATELESS,
20         QAT_COMP_REQUEST_DYNAMIC_COMP_STATELESS,
21         QAT_COMP_REQUEST_DECOMPRESS,
22         REQ_COMP_END
23 };
24
25
26 struct qat_comp_xform {
27         struct icp_qat_fw_comp_req qat_comp_req_tmpl;
28         enum qat_comp_request_type qat_comp_request_type;
29         enum rte_comp_checksum_type checksum_type;
30 };
31
32 int
33 qat_comp_build_request(void *in_op, uint8_t *out_msg, void *op_cookie,
34                        enum qat_device_gen qat_dev_gen __rte_unused);
35
36 int
37 qat_comp_process_response(void **op, uint8_t *resp);
38
39
40 int
41 qat_comp_private_xform_create(struct rte_compressdev *dev,
42                               const struct rte_comp_xform *xform,
43                               void **private_xform);
44
45 int
46 qat_comp_private_xform_free(struct rte_compressdev *dev, void *private_xform);
47
48 unsigned int
49 qat_comp_xform_size(void);
50
51 #endif
52 #endif