DPDK 25.03.0-rc0
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
16#include "rte_comp.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
27 uint8_t min;
28 uint8_t max;
29 uint8_t increment;
35};
36
39 enum rte_comp_algorithm algo;
40 /* Compression algorithm */
45};
46
48#define RTE_COMP_END_OF_CAPABILITIES_LIST() \
49 { RTE_COMP_ALGO_UNSPECIFIED }
50
52rte_compressdev_capability_get(uint8_t dev_id,
53 enum rte_comp_algorithm algo);
54
62#define RTE_COMPDEV_FF_HW_ACCELERATED (1ULL << 0)
64#define RTE_COMPDEV_FF_CPU_SSE (1ULL << 1)
66#define RTE_COMPDEV_FF_CPU_AVX (1ULL << 2)
68#define RTE_COMPDEV_FF_CPU_AVX2 (1ULL << 3)
70#define RTE_COMPDEV_FF_CPU_AVX512 (1ULL << 4)
72#define RTE_COMPDEV_FF_CPU_NEON (1ULL << 5)
74#define RTE_COMPDEV_FF_OP_DONE_IN_DEQUEUE (1ULL << 6)
90const char *
92
95 const char *driver_name;
96 uint64_t feature_flags;
103};
104
116};
117
118
128int
130
140const char *
142
150uint8_t
152
167uint8_t
168rte_compressdev_devices_get(const char *driver_name, uint8_t *devices,
169 uint8_t nb_devices);
170
171/*
172 * Return the NUMA socket to which a device is connected.
173 *
174 * @param dev_id
175 * Compress device identifier
176 * @return
177 * The NUMA socket id to which the device is connected or
178 * a default of zero if the socket could not be determined.
179 * -1 if returned is the dev_id value is out of range.
180 */
181int
182rte_compressdev_socket_id(uint8_t dev_id);
183
194};
195
211int
213 struct rte_compressdev_config *config);
214
229int
230rte_compressdev_start(uint8_t dev_id);
231
239void
240rte_compressdev_stop(uint8_t dev_id);
241
256int
257rte_compressdev_close(uint8_t dev_id);
258
282int
283rte_compressdev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
284 uint32_t max_inflight_ops, int socket_id);
285
294uint16_t
296
297
311int
313
320void
322
337void
338rte_compressdev_info_get(uint8_t dev_id, struct rte_compressdev_info *dev_info);
339
394uint16_t
395rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
396 struct rte_comp_op **ops, uint16_t nb_ops);
397
448uint16_t
449rte_compressdev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
450 struct rte_comp_op **ops, uint16_t nb_ops);
451
475int
477 const struct rte_comp_xform *xform,
478 void **stream);
479
496int
497rte_compressdev_stream_free(uint8_t dev_id, void *stream);
498
522int
524 const struct rte_comp_xform *xform,
525 void **private_xform);
526
543int
544rte_compressdev_private_xform_free(uint8_t dev_id, void *private_xform);
545
546#ifdef __cplusplus
547}
548#endif
549
550#endif /* _RTE_COMPRESSDEV_H_ */
rte_comp_algorithm
Definition: rte_comp.h:106
int rte_compressdev_private_xform_create(uint8_t dev_id, const struct rte_comp_xform *xform, void **private_xform)
int rte_compressdev_stream_free(uint8_t dev_id, void *stream)
int rte_compressdev_configure(uint8_t dev_id, struct rte_compressdev_config *config)
int rte_compressdev_private_xform_free(uint8_t dev_id, void *private_xform)
int rte_compressdev_stream_create(uint8_t dev_id, const struct rte_comp_xform *xform, void **stream)
int rte_compressdev_close(uint8_t dev_id)
uint16_t rte_compressdev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_comp_op **ops, uint16_t nb_ops)
int rte_compressdev_get_dev_id(const char *name)
int rte_compressdev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, uint32_t max_inflight_ops, int socket_id)
void rte_compressdev_stop(uint8_t dev_id)
const char * rte_compressdev_name_get(uint8_t dev_id)
uint16_t rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_comp_op **ops, uint16_t nb_ops)
uint16_t rte_compressdev_queue_pair_count(uint8_t dev_id)
void rte_compressdev_info_get(uint8_t dev_id, struct rte_compressdev_info *dev_info)
int rte_compressdev_stats_get(uint8_t dev_id, struct rte_compressdev_stats *stats)
uint8_t rte_compressdev_devices_get(const char *driver_name, uint8_t *devices, uint8_t nb_devices)
const char * rte_compressdev_get_feature_name(uint64_t flag)
uint8_t rte_compressdev_count(void)
int rte_compressdev_start(uint8_t dev_id)
void rte_compressdev_stats_reset(uint8_t dev_id)
struct rte_param_log2_range window_size
const char * driver_name
const struct rte_compressdev_capabilities * capabilities