DPDK 22.11.5
rte_compressdev.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017-2018 Intel Corporation
3 */
4
5#ifndef _RTE_COMPRESSDEV_H_
6#define _RTE_COMPRESSDEV_H_
7
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24
25#include <rte_compat.h>
26#include "rte_comp.h"
27
33 uint8_t min;
34 uint8_t max;
35 uint8_t increment;
41};
42
45 enum rte_comp_algorithm algo;
46 /* Compression algorithm */
51};
52
54#define RTE_COMP_END_OF_CAPABILITIES_LIST() \
55 { RTE_COMP_ALGO_UNSPECIFIED }
56
57__rte_experimental
59rte_compressdev_capability_get(uint8_t dev_id,
60 enum rte_comp_algorithm algo);
61
69#define RTE_COMPDEV_FF_HW_ACCELERATED (1ULL << 0)
71#define RTE_COMPDEV_FF_CPU_SSE (1ULL << 1)
73#define RTE_COMPDEV_FF_CPU_AVX (1ULL << 2)
75#define RTE_COMPDEV_FF_CPU_AVX2 (1ULL << 3)
77#define RTE_COMPDEV_FF_CPU_AVX512 (1ULL << 4)
79#define RTE_COMPDEV_FF_CPU_NEON (1ULL << 5)
81#define RTE_COMPDEV_FF_OP_DONE_IN_DEQUEUE (1ULL << 6)
97__rte_experimental
98const char *
100
103 const char *driver_name;
104 uint64_t feature_flags;
111};
112
124};
125
126
136__rte_experimental
137int
139
149__rte_experimental
150const char *
152
160__rte_experimental
161uint8_t
163
178__rte_experimental
179uint8_t
180rte_compressdev_devices_get(const char *driver_name, uint8_t *devices,
181 uint8_t nb_devices);
182
183/*
184 * Return the NUMA socket to which a device is connected.
185 *
186 * @param dev_id
187 * Compress device identifier
188 * @return
189 * The NUMA socket id to which the device is connected or
190 * a default of zero if the socket could not be determined.
191 * -1 if returned is the dev_id value is out of range.
192 */
193__rte_experimental
194int
195rte_compressdev_socket_id(uint8_t dev_id);
196
207};
208
224__rte_experimental
225int
227 struct rte_compressdev_config *config);
228
243__rte_experimental
244int
245rte_compressdev_start(uint8_t dev_id);
246
254__rte_experimental
255void
256rte_compressdev_stop(uint8_t dev_id);
257
272__rte_experimental
273int
274rte_compressdev_close(uint8_t dev_id);
275
299__rte_experimental
300int
301rte_compressdev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
302 uint32_t max_inflight_ops, int socket_id);
303
312__rte_experimental
313uint16_t
315
316
330__rte_experimental
331int
333
340__rte_experimental
341void
343
358__rte_experimental
359void
360rte_compressdev_info_get(uint8_t dev_id, struct rte_compressdev_info *dev_info);
361
416__rte_experimental
417uint16_t
418rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
419 struct rte_comp_op **ops, uint16_t nb_ops);
420
471__rte_experimental
472uint16_t
473rte_compressdev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
474 struct rte_comp_op **ops, uint16_t nb_ops);
475
500__rte_experimental
501int
503 const struct rte_comp_xform *xform,
504 void **stream);
505
522__rte_experimental
523int
524rte_compressdev_stream_free(uint8_t dev_id, void *stream);
525
549__rte_experimental
550int
552 const struct rte_comp_xform *xform,
553 void **private_xform);
554
571__rte_experimental
572int
573rte_compressdev_private_xform_free(uint8_t dev_id, void *private_xform);
574
575#ifdef __cplusplus
576}
577#endif
578
579#endif /* _RTE_COMPRESSDEV_H_ */
rte_comp_algorithm
Definition: rte_comp.h:96
__rte_experimental uint16_t rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_comp_op **ops, uint16_t nb_ops)
__rte_experimental const char * rte_compressdev_name_get(uint8_t dev_id)
__rte_experimental int rte_compressdev_private_xform_free(uint8_t dev_id, void *private_xform)
__rte_experimental const char * rte_compressdev_get_feature_name(uint64_t flag)
__rte_experimental int rte_compressdev_configure(uint8_t dev_id, struct rte_compressdev_config *config)
__rte_experimental uint16_t rte_compressdev_queue_pair_count(uint8_t dev_id)
__rte_experimental void rte_compressdev_stop(uint8_t dev_id)
__rte_experimental int rte_compressdev_stats_get(uint8_t dev_id, struct rte_compressdev_stats *stats)
__rte_experimental int rte_compressdev_get_dev_id(const char *name)
__rte_experimental int rte_compressdev_stream_create(uint8_t dev_id, const struct rte_comp_xform *xform, void **stream)
__rte_experimental int rte_compressdev_start(uint8_t dev_id)
__rte_experimental uint8_t rte_compressdev_count(void)
__rte_experimental void rte_compressdev_stats_reset(uint8_t dev_id)
__rte_experimental int rte_compressdev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, uint32_t max_inflight_ops, int socket_id)
__rte_experimental int rte_compressdev_private_xform_create(uint8_t dev_id, const struct rte_comp_xform *xform, void **private_xform)
__rte_experimental uint16_t rte_compressdev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_comp_op **ops, uint16_t nb_ops)
__rte_experimental uint8_t rte_compressdev_devices_get(const char *driver_name, uint8_t *devices, uint8_t nb_devices)
__rte_experimental int rte_compressdev_stream_free(uint8_t dev_id, void *stream)
__rte_experimental void rte_compressdev_info_get(uint8_t dev_id, struct rte_compressdev_info *dev_info)
__rte_experimental int rte_compressdev_close(uint8_t dev_id)
struct rte_param_log2_range window_size
const char * driver_name
const struct rte_compressdev_capabilities * capabilities