DPDK 21.11.9
rte_bbdev_pmd.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
3 */
4
5#ifndef _RTE_BBDEV_PMD_H_
6#define _RTE_BBDEV_PMD_H_
7
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#include <stdint.h>
22#include <rte_log.h>
23
24#include "rte_bbdev.h"
25
27#define RTE_BBDEV_DEFAULT_MAX_NB_QUEUES RTE_MAX_LCORE
28
30#define RTE_BBDEV_QUEUE_SIZE_LIMIT 16384
31
43struct rte_bbdev *
44rte_bbdev_allocate(const char *name);
45
55int
56rte_bbdev_release(struct rte_bbdev *bbdev);
57
69struct rte_bbdev *
70rte_bbdev_get_named_dev(const char *name);
71
79typedef int (*rte_bbdev_setup_queues_t)(struct rte_bbdev *dev,
80 uint16_t num_queues, int socket_id);
81
83typedef int (*rte_bbdev_intr_enable_t)(struct rte_bbdev *dev);
84
86typedef int (*rte_bbdev_queue_setup_t)(struct rte_bbdev *dev,
87 uint16_t queue_id, const struct rte_bbdev_queue_conf *conf);
88
89/*
90 * @internal
91 * Function to release memory resources allocated for a device queue.
92 */
93typedef int (*rte_bbdev_queue_release_t)(struct rte_bbdev *dev,
94 uint16_t queue_id);
95
97typedef int (*rte_bbdev_start_t)(struct rte_bbdev *dev);
98
100typedef void (*rte_bbdev_stop_t)(struct rte_bbdev *dev);
101
103typedef int (*rte_bbdev_close_t)(struct rte_bbdev *dev);
104
106typedef int (*rte_bbdev_queue_start_t)(struct rte_bbdev *dev,
107 uint16_t queue_id);
108
110typedef int (*rte_bbdev_queue_stop_t)(struct rte_bbdev *dev, uint16_t queue_id);
111
113typedef void (*rte_bbdev_stats_get_t)(struct rte_bbdev *dev,
114 struct rte_bbdev_stats *stats);
115
117typedef void (*rte_bbdev_stats_reset_t)(struct rte_bbdev *dev);
118
120typedef void (*rte_bbdev_info_get_t)(struct rte_bbdev *dev,
121 struct rte_bbdev_driver_info *dev_info);
122
123/*
124 * @internal
125 * Function to enable interrupt for next op on a queue of a device.
126 */
127typedef int (*rte_bbdev_queue_intr_enable_t)(struct rte_bbdev *dev,
128 uint16_t queue_id);
129
130/*
131 * @internal
132 * Function to disable interrupt for next op on a queue of a device.
133 */
134typedef int (*rte_bbdev_queue_intr_disable_t)(struct rte_bbdev *dev,
135 uint16_t queue_id);
136
146 rte_bbdev_intr_enable_t intr_enable;
148 rte_bbdev_start_t start;
150 rte_bbdev_stop_t stop;
152 rte_bbdev_close_t close;
153
155 rte_bbdev_info_get_t info_get;
157 rte_bbdev_stats_get_t stats_get;
159 rte_bbdev_stats_reset_t stats_reset;
160
162 rte_bbdev_queue_setup_t queue_setup;
164 rte_bbdev_queue_release_t queue_release;
166 rte_bbdev_queue_start_t queue_start;
168 rte_bbdev_queue_stop_t queue_stop;
169
171 rte_bbdev_queue_intr_enable_t queue_intr_enable;
173 rte_bbdev_queue_intr_disable_t queue_intr_disable;
174};
175
187void
188rte_bbdev_pmd_callback_process(struct rte_bbdev *dev,
189 enum rte_bbdev_event_type event, void *ret_param);
190
191#ifdef __cplusplus
192}
193#endif
194
195#endif /* _RTE_BBDEV_PMD_H_ */
rte_bbdev_event_type
Definition: rte_bbdev.h:703
struct rte_bbdev * rte_bbdev_get_named_dev(const char *name)
int(* rte_bbdev_setup_queues_t)(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
Definition: rte_bbdev_pmd.h:79
void rte_bbdev_pmd_callback_process(struct rte_bbdev *dev, enum rte_bbdev_event_type event, void *ret_param)
rte_bbdev_queue_setup_t queue_setup
rte_bbdev_stop_t stop
rte_bbdev_queue_stop_t queue_stop
rte_bbdev_info_get_t info_get
rte_bbdev_queue_intr_disable_t queue_intr_disable
rte_bbdev_intr_enable_t intr_enable
rte_bbdev_stats_get_t stats_get
rte_bbdev_stats_reset_t stats_reset
rte_bbdev_queue_release_t queue_release
rte_bbdev_close_t close
rte_bbdev_start_t start
rte_bbdev_setup_queues_t setup_queues
rte_bbdev_queue_intr_enable_t queue_intr_enable
rte_bbdev_queue_start_t queue_start