DPDK  18.11.11
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
21 extern "C" {
22 #endif
23 
24 #include <rte_common.h>
25 
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 const struct rte_compressdev_capabilities * __rte_experimental
58 rte_compressdev_capability_get(uint8_t dev_id,
59  enum rte_comp_algorithm algo);
60 
68 #define RTE_COMPDEV_FF_HW_ACCELERATED (1ULL << 0)
69 
70 #define RTE_COMPDEV_FF_CPU_SSE (1ULL << 1)
71 
72 #define RTE_COMPDEV_FF_CPU_AVX (1ULL << 2)
73 
74 #define RTE_COMPDEV_FF_CPU_AVX2 (1ULL << 3)
75 
76 #define RTE_COMPDEV_FF_CPU_AVX512 (1ULL << 4)
77 
78 #define RTE_COMPDEV_FF_CPU_NEON (1ULL << 5)
79 
90 const char * __rte_experimental
92 
95  const char *driver_name;
96  uint64_t feature_flags;
103 };
104 
107  uint64_t enqueued_count;
109  uint64_t dequeued_count;
116 };
117 
118 
128 int __rte_experimental
129 rte_compressdev_get_dev_id(const char *name);
130 
140 const char * __rte_experimental
141 rte_compressdev_name_get(uint8_t dev_id);
142 
150 uint8_t __rte_experimental
152 
167 uint8_t __rte_experimental
168 rte_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  */
181 int __rte_experimental
182 rte_compressdev_socket_id(uint8_t dev_id);
183 
188  uint16_t nb_queue_pairs;
192  uint16_t max_nb_streams;
194 };
195 
211 int __rte_experimental
212 rte_compressdev_configure(uint8_t dev_id,
213  struct rte_compressdev_config *config);
214 
229 int __rte_experimental
230 rte_compressdev_start(uint8_t dev_id);
231 
239 void __rte_experimental
240 rte_compressdev_stop(uint8_t dev_id);
241 
256 int __rte_experimental
257 rte_compressdev_close(uint8_t dev_id);
258 
282 int __rte_experimental
283 rte_compressdev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
284  uint32_t max_inflight_ops, int socket_id);
285 
294 uint16_t __rte_experimental
295 rte_compressdev_queue_pair_count(uint8_t dev_id);
296 
297 
311 int __rte_experimental
312 rte_compressdev_stats_get(uint8_t dev_id, struct rte_compressdev_stats *stats);
313 
320 void __rte_experimental
321 rte_compressdev_stats_reset(uint8_t dev_id);
322 
337 void __rte_experimental
338 rte_compressdev_info_get(uint8_t dev_id, struct rte_compressdev_info *dev_info);
339 
394 uint16_t __rte_experimental
395 rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
396  struct rte_comp_op **ops, uint16_t nb_ops);
397 
448 uint16_t __rte_experimental
449 rte_compressdev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
450  struct rte_comp_op **ops, uint16_t nb_ops);
451 
476 int __rte_experimental
477 rte_compressdev_stream_create(uint8_t dev_id,
478  const struct rte_comp_xform *xform,
479  void **stream);
480 
497 int __rte_experimental
498 rte_compressdev_stream_free(uint8_t dev_id, void *stream);
499 
523 int __rte_experimental
525  const struct rte_comp_xform *xform,
526  void **private_xform);
527 
544 int __rte_experimental
545 rte_compressdev_private_xform_free(uint8_t dev_id, void *private_xform);
546 
547 #ifdef __cplusplus
548 }
549 #endif
550 
551 #endif /* _RTE_COMPRESSDEV_H_ */
const char * driver_name
int __rte_experimental rte_compressdev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, uint32_t max_inflight_ops, int socket_id)
int __rte_experimental rte_compressdev_private_xform_create(uint8_t dev_id, const struct rte_comp_xform *xform, void **private_xform)
int __rte_experimental rte_compressdev_get_dev_id(const char *name)
uint8_t __rte_experimental rte_compressdev_count(void)
rte_comp_algorithm
Definition: rte_comp.h:96
const char *__rte_experimental rte_compressdev_get_feature_name(uint64_t flag)
int __rte_experimental rte_compressdev_close(uint8_t dev_id)
void __rte_experimental rte_compressdev_stop(uint8_t dev_id)
const char *__rte_experimental rte_compressdev_name_get(uint8_t dev_id)
int __rte_experimental rte_compressdev_configure(uint8_t dev_id, struct rte_compressdev_config *config)
uint16_t __rte_experimental rte_compressdev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_comp_op **ops, uint16_t nb_ops)
int __rte_experimental rte_compressdev_stream_free(uint8_t dev_id, void *stream)
int __rte_experimental rte_compressdev_stream_create(uint8_t dev_id, const struct rte_comp_xform *xform, void **stream)
uint16_t __rte_experimental rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_comp_op **ops, uint16_t nb_ops)
uint16_t __rte_experimental rte_compressdev_queue_pair_count(uint8_t dev_id)
int __rte_experimental rte_compressdev_private_xform_free(uint8_t dev_id, void *private_xform)
int __rte_experimental rte_compressdev_stats_get(uint8_t dev_id, struct rte_compressdev_stats *stats)
int __rte_experimental rte_compressdev_start(uint8_t dev_id)
const struct rte_compressdev_capabilities * capabilities
struct rte_param_log2_range window_size
void __rte_experimental rte_compressdev_info_get(uint8_t dev_id, struct rte_compressdev_info *dev_info)
uint8_t __rte_experimental rte_compressdev_devices_get(const char *driver_name, uint8_t *devices, uint8_t nb_devices)
void __rte_experimental rte_compressdev_stats_reset(uint8_t dev_id)