1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017-2018 Intel Corporation
5 #ifndef _RTE_COMPRESSDEV_INTERNAL_H_
6 #define _RTE_COMPRESSDEV_INTERNAL_H_
8 /* rte_compressdev_internal.h
9 * This file holds Compressdev private data structures.
13 #define RTE_COMPRESSDEV_NAME_MAX_LEN (64)
14 /**< Max length of name of comp PMD */
17 extern int compressdev_logtype;
18 #define COMPRESSDEV_LOG(level, fmt, args...) \
19 rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): "fmt "\n", \
23 /** The data structure associated with each comp device. */
24 struct rte_compressdev {
25 struct rte_compressdev_data *data;
26 /**< Pointer to device data */
27 struct rte_compressdev_ops *dev_ops;
28 /**< Functions exported by PMD */
29 uint64_t feature_flags;
30 /**< Supported features */
31 struct rte_device *device;
32 /**< Backing device */
35 /**< comp driver identifier*/
39 /**< Flag indicating the device is attached */
40 } __rte_cache_aligned;
44 * The data part, with no function pointers, associated with each device.
46 * This structure is safe to place in shared memory to be common among
47 * different processes in a multi-process configuration.
49 struct rte_compressdev_data {
51 /**< Compress device identifier */
53 /**< Socket identifier where memory is allocated */
54 char name[RTE_COMPRESSDEV_NAME_MAX_LEN];
55 /**< Unique identifier name */
58 uint8_t dev_started : 1;
59 /**< Device state: STARTED(1)/STOPPED(0) */
62 /**< Array of pointers to queue pairs. */
63 uint16_t nb_queue_pairs;
64 /**< Number of device queue pairs */
67 /**< PMD-specific private data */
68 } __rte_cache_aligned;