DPDK 22.11.0-rc2
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_comp.h"
26
32 uint8_t min;
33 uint8_t max;
34 uint8_t increment;
40};
41
44 enum rte_comp_algorithm algo;
45 /* Compression algorithm */
50};
51
53#define RTE_COMP_END_OF_CAPABILITIES_LIST() \
54 { RTE_COMP_ALGO_UNSPECIFIED }
55
56__rte_experimental
58rte_compressdev_capability_get(uint8_t dev_id,
59 enum rte_comp_algorithm algo);
60
68#define RTE_COMPDEV_FF_HW_ACCELERATED (1ULL << 0)
70#define RTE_COMPDEV_FF_CPU_SSE (1ULL << 1)
72#define RTE_COMPDEV_FF_CPU_AVX (1ULL << 2)
74#define RTE_COMPDEV_FF_CPU_AVX2 (1ULL << 3)
76#define RTE_COMPDEV_FF_CPU_AVX512 (1ULL << 4)
78#define RTE_COMPDEV_FF_CPU_NEON (1ULL << 5)
80#define RTE_COMPDEV_FF_OP_DONE_IN_DEQUEUE (1ULL << 6)
96__rte_experimental
97const char *
99
102 const char *driver_name;
103 uint64_t feature_flags;
110};
111
123};
124
125
135__rte_experimental
136int
138
148__rte_experimental
149const char *
151
159__rte_experimental
160uint8_t
162
177__rte_experimental
178uint8_t
179rte_compressdev_devices_get(const char *driver_name, uint8_t *devices,
180 uint8_t nb_devices);
181
182/*
183 * Return the NUMA socket to which a device is connected.
184 *
185 * @param dev_id
186 * Compress device identifier
187 * @return
188 * The NUMA socket id to which the device is connected or
189 * a default of zero if the socket could not be determined.
190 * -1 if returned is the dev_id value is out of range.
191 */
192__rte_experimental
193int
194rte_compressdev_socket_id(uint8_t dev_id);
195
206};
207
223__rte_experimental
224int
226 struct rte_compressdev_config *config);
227
242__rte_experimental
243int
244rte_compressdev_start(uint8_t dev_id);
245
253__rte_experimental
254void
255rte_compressdev_stop(uint8_t dev_id);
256
271__rte_experimental
272int
273rte_compressdev_close(uint8_t dev_id);
274
298__rte_experimental
299int
300rte_compressdev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
301 uint32_t max_inflight_ops, int socket_id);
302
311__rte_experimental
312uint16_t
314
315
329__rte_experimental
330int
332
339__rte_experimental
340void
342
357__rte_experimental
358void
359rte_compressdev_info_get(uint8_t dev_id, struct rte_compressdev_info *dev_info);
360
415__rte_experimental
416uint16_t
417rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
418 struct rte_comp_op **ops, uint16_t nb_ops);
419
470__rte_experimental
471uint16_t
472rte_compressdev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
473 struct rte_comp_op **ops, uint16_t nb_ops);
474
499__rte_experimental
500int
502 const struct rte_comp_xform *xform,
503 void **stream);
504
521__rte_experimental
522int
523rte_compressdev_stream_free(uint8_t dev_id, void *stream);
524
548__rte_experimental
549int
551 const struct rte_comp_xform *xform,
552 void **private_xform);
553
570__rte_experimental
571int
572rte_compressdev_private_xform_free(uint8_t dev_id, void *private_xform);
573
574#ifdef __cplusplus
575}
576#endif
577
578#endif /* _RTE_COMPRESSDEV_H_ */
rte_comp_algorithm
Definition: rte_comp.h:95
__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