DPDK 22.11.7
rte_compressdev_pmd.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_PMD_H_
6#define _RTE_COMPRESSDEV_PMD_H_
7
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#include <string.h>
21
22#include <dev_driver.h>
23
24#include <rte_compat.h>
25#include "rte_compressdev.h"
26#include "rte_compressdev_internal.h"
27
28#define RTE_COMPRESSDEV_PMD_NAME_ARG ("name")
29#define RTE_COMPRESSDEV_PMD_SOCKET_ID_ARG ("socket_id")
30
31static const char * const compressdev_pmd_valid_params[] = {
32 RTE_COMPRESSDEV_PMD_NAME_ARG,
33 RTE_COMPRESSDEV_PMD_SOCKET_ID_ARG
34};
35
40struct rte_compressdev_pmd_init_params {
41 char name[RTE_COMPRESSDEV_NAME_MAX_LEN];
42 int socket_id;
43};
44
48 struct rte_compressdev_data *data[RTE_COMPRESS_MAX_DEVS];
50 uint8_t nb_devs;
51 uint8_t max_devs;
52};
53
62__rte_experimental
63struct rte_compressdev *
65
82typedef int (*compressdev_configure_t)(struct rte_compressdev *dev,
83 struct rte_compressdev_config *config);
84
93typedef int (*compressdev_start_t)(struct rte_compressdev *dev);
94
101typedef void (*compressdev_stop_t)(struct rte_compressdev *dev);
102
112typedef int (*compressdev_close_t)(struct rte_compressdev *dev);
113
114
123typedef void (*compressdev_stats_get_t)(struct rte_compressdev *dev,
124 struct rte_compressdev_stats *stats);
125
126
133typedef void (*compressdev_stats_reset_t)(struct rte_compressdev *dev);
134
135
144typedef void (*compressdev_info_get_t)(struct rte_compressdev *dev,
145 struct rte_compressdev_info *dev_info);
146
162 uint16_t qp_id, uint32_t max_inflight_ops, int socket_id);
163
176 uint16_t qp_id);
177
195 const struct rte_comp_xform *xform, void **stream);
196
212 void *stream);
213
232 const struct rte_comp_xform *xform, void **private_xform);
233
248 void *private_xform);
249
278};
279
295__rte_experimental
296struct rte_compressdev *
297rte_compressdev_pmd_allocate(const char *name, int socket_id);
298
311__rte_experimental
312int
313rte_compressdev_pmd_release_device(struct rte_compressdev *dev);
314
315
334__rte_experimental
335int
336rte_compressdev_pmd_parse_input_args(
337 struct rte_compressdev_pmd_init_params *params,
338 const char *args);
339
356__rte_experimental
357struct rte_compressdev *
358rte_compressdev_pmd_create(const char *name,
359 struct rte_device *device,
360 size_t private_data_size,
361 struct rte_compressdev_pmd_init_params *params);
362
375__rte_experimental
376int
377rte_compressdev_pmd_destroy(struct rte_compressdev *dev);
378
379#ifdef __cplusplus
380}
381#endif
382
383#endif /* _RTE_COMPRESSDEV_PMD_H_ */
int(* compressdev_close_t)(struct rte_compressdev *dev)
void(* compressdev_stats_reset_t)(struct rte_compressdev *dev)
int(* compressdev_private_xform_free_t)(struct rte_compressdev *dev, void *private_xform)
int(* compressdev_configure_t)(struct rte_compressdev *dev, struct rte_compressdev_config *config)
void(* compressdev_info_get_t)(struct rte_compressdev *dev, struct rte_compressdev_info *dev_info)
void(* compressdev_stop_t)(struct rte_compressdev *dev)
int(* compressdev_start_t)(struct rte_compressdev *dev)
__rte_experimental struct rte_compressdev * rte_compressdev_pmd_get_named_dev(const char *name)
int(* compressdev_stream_free_t)(struct rte_compressdev *dev, void *stream)
int(* compressdev_private_xform_create_t)(struct rte_compressdev *dev, const struct rte_comp_xform *xform, void **private_xform)
int(* compressdev_queue_pair_setup_t)(struct rte_compressdev *dev, uint16_t qp_id, uint32_t max_inflight_ops, int socket_id)
int(* compressdev_stream_create_t)(struct rte_compressdev *dev, const struct rte_comp_xform *xform, void **stream)
int(* compressdev_queue_pair_release_t)(struct rte_compressdev *dev, uint16_t qp_id)
void(* compressdev_stats_get_t)(struct rte_compressdev *dev, struct rte_compressdev_stats *stats)
struct rte_compressdev_data * data[RTE_COMPRESS_MAX_DEVS]
struct rte_compressdev * devs
compressdev_stream_create_t stream_create
compressdev_configure_t dev_configure
compressdev_close_t dev_close
compressdev_private_xform_free_t private_xform_free
compressdev_queue_pair_setup_t queue_pair_setup
compressdev_info_get_t dev_infos_get
compressdev_stream_free_t stream_free
compressdev_stats_reset_t stats_reset
compressdev_stats_get_t stats_get
compressdev_start_t dev_start
compressdev_queue_pair_release_t queue_pair_release
compressdev_private_xform_create_t private_xform_create
compressdev_stop_t dev_stop
struct rte_device * device