1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
5 #ifndef _ISAL_COMP_PMD_PRIVATE_H_
6 #define _ISAL_COMP_PMD_PRIVATE_H_
8 #define COMPDEV_NAME_ISAL_PMD compress_isal
9 /**< ISA-L comp PMD device name */
11 extern int isal_logtype_driver;
12 #define ISAL_PMD_LOG(level, fmt, args...) \
13 rte_log(RTE_LOG_ ## level, isal_logtype_driver, "%s(): "fmt "\n", \
16 /* private data structure for each ISA-L compression device */
17 struct isal_comp_private {
18 struct rte_mempool *priv_xform_mp;
21 /** ISA-L queue pair */
23 /* Queue Pair Identifier */
25 /* Unique Queue Pair Name */
26 char name[RTE_COMPRESSDEV_NAME_MAX_LEN];
27 /* Ring for placing process packets */
28 struct rte_ring *processed_pkts;
29 /* Queue pair statistics */
30 struct rte_compressdev_stats qp_stats;
31 /* Compression stream information*/
32 struct isal_zstream *stream;
33 /* Decompression state information*/
34 struct inflate_state *state;
35 /* Number of free elements on ring */
36 uint16_t num_free_elements;
37 } __rte_cache_aligned;
39 /** ISA-L private xform structure */
40 struct isal_priv_xform {
41 enum rte_comp_xform_type type;
43 struct rte_comp_compress_xform compress;
44 struct rte_comp_decompress_xform decompress;
46 uint32_t level_buffer_size;
47 } __rte_cache_aligned;
49 /** Set and validate NULL comp private xform parameters */
51 isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
52 const struct rte_comp_xform *xform);
54 /** device specific operations function pointer structure */
55 extern struct rte_compressdev_ops *isal_compress_pmd_ops;
57 #endif /* _ISAL_COMP_PMD_PRIVATE_H_ */