DPDK 25.03.0-rc0
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#include <stdint.h>
18#include <rte_log.h>
19
20#include "rte_bbdev.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
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
68struct rte_bbdev *
69rte_bbdev_get_named_dev(const char *name);
70
78typedef int (*rte_bbdev_setup_queues_t)(struct rte_bbdev *dev,
79 uint16_t num_queues, int socket_id);
80
82typedef int (*rte_bbdev_intr_enable_t)(struct rte_bbdev *dev);
83
85typedef int (*rte_bbdev_queue_setup_t)(struct rte_bbdev *dev,
86 uint16_t queue_id, const struct rte_bbdev_queue_conf *conf);
87
88/*
89 * @internal
90 * Function to release memory resources allocated for a device queue.
91 */
92typedef int (*rte_bbdev_queue_release_t)(struct rte_bbdev *dev,
93 uint16_t queue_id);
94
96typedef int (*rte_bbdev_start_t)(struct rte_bbdev *dev);
97
99typedef void (*rte_bbdev_stop_t)(struct rte_bbdev *dev);
100
102typedef int (*rte_bbdev_close_t)(struct rte_bbdev *dev);
103
105typedef int (*rte_bbdev_queue_start_t)(struct rte_bbdev *dev,
106 uint16_t queue_id);
107
109typedef int (*rte_bbdev_queue_stop_t)(struct rte_bbdev *dev, uint16_t queue_id);
110
112typedef void (*rte_bbdev_stats_get_t)(struct rte_bbdev *dev,
113 struct rte_bbdev_stats *stats);
114
116typedef void (*rte_bbdev_stats_reset_t)(struct rte_bbdev *dev);
117
119typedef void (*rte_bbdev_info_get_t)(struct rte_bbdev *dev,
120 struct rte_bbdev_driver_info *dev_info);
121
122/*
123 * @internal
124 * Function to enable interrupt for next op on a queue of a device.
125 */
126typedef int (*rte_bbdev_queue_intr_enable_t)(struct rte_bbdev *dev,
127 uint16_t queue_id);
128
129/*
130 * @internal
131 * Function to disable interrupt for next op on a queue of a device.
132 */
133typedef int (*rte_bbdev_queue_intr_disable_t)(struct rte_bbdev *dev,
134 uint16_t queue_id);
135
136/*
137 * @internal
138 * Function to dump previous operations on a queue of a device.
139 */
140typedef int (*rte_bbdev_queue_ops_dump_t)(struct rte_bbdev *dev,
141 uint16_t queue_id, FILE *file);
142
152 rte_bbdev_intr_enable_t intr_enable;
154 rte_bbdev_start_t start;
156 rte_bbdev_stop_t stop;
158 rte_bbdev_close_t close;
159
161 rte_bbdev_info_get_t info_get;
163 rte_bbdev_stats_get_t stats_get;
165 rte_bbdev_stats_reset_t stats_reset;
166
168 rte_bbdev_queue_setup_t queue_setup;
170 rte_bbdev_queue_release_t queue_release;
172 rte_bbdev_queue_start_t queue_start;
174 rte_bbdev_queue_stop_t queue_stop;
175
177 rte_bbdev_queue_intr_enable_t queue_intr_enable;
179 rte_bbdev_queue_intr_disable_t queue_intr_disable;
181 rte_bbdev_queue_ops_dump_t queue_ops_dump;
182};
183
195void
196rte_bbdev_pmd_callback_process(struct rte_bbdev *dev,
197 enum rte_bbdev_event_type event, void *ret_param);
198
199#ifdef __cplusplus
200}
201#endif
202
203#endif /* _RTE_BBDEV_PMD_H_ */
rte_bbdev_event_type
Definition: rte_bbdev.h:910
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:78
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_queue_ops_dump_t queue_ops_dump
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