35 #include <rte_compat.h>
43 #ifndef RTE_BBDEV_MAX_DEVS
44 #define RTE_BBDEV_MAX_DEVS 128
59 uint16_t __rte_experimental
71 bool __rte_experimental
84 uint16_t __rte_experimental
88 #define RTE_BBDEV_FOREACH(i) for (i = rte_bbdev_find_next(-1); \
89 i < RTE_BBDEV_MAX_DEVS; \
90 i = rte_bbdev_find_next(i))
113 int __rte_experimental
130 int __rte_experimental
159 int __rte_experimental
174 int __rte_experimental
187 int __rte_experimental
200 int __rte_experimental
217 int __rte_experimental
232 int __rte_experimental
260 int __rte_experimental
271 int __rte_experimental
302 #define RTE_BBDEV_END_OF_CAPABILITIES_LIST() \
303 { RTE_BBDEV_OP_NONE }
331 int __rte_experimental
357 int __rte_experimental
362 struct rte_bbdev_queue_data {
370 typedef uint16_t (*rte_bbdev_enqueue_enc_ops_t)(
371 struct rte_bbdev_queue_data *q_data,
376 typedef uint16_t (*rte_bbdev_enqueue_dec_ops_t)(
377 struct rte_bbdev_queue_data *q_data,
382 typedef uint16_t (*rte_bbdev_dequeue_enc_ops_t)(
383 struct rte_bbdev_queue_data *q_data,
387 typedef uint16_t (*rte_bbdev_dequeue_dec_ops_t)(
388 struct rte_bbdev_queue_data *q_data,
391 #define RTE_BBDEV_NAME_MAX_LEN 64
399 struct rte_bbdev_data {
403 struct rte_bbdev_queue_data *queues;
413 struct rte_bbdev_callback;
417 TAILQ_HEAD(rte_bbdev_cb_list, rte_bbdev_callback);
425 rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops;
427 rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops;
429 rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops;
431 rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops;
433 struct rte_bbdev_data *data;
437 struct rte_bbdev_cb_list list_cbs;
442 extern struct rte_bbdev rte_bbdev_devices[];
465 static inline uint16_t
469 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
470 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
471 return dev->enqueue_enc_ops(q_data, ops, num_ops);
495 static inline uint16_t
499 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
500 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
501 return dev->enqueue_dec_ops(q_data, ops, num_ops);
525 static inline uint16_t
529 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
530 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
531 return dev->dequeue_enc_ops(q_data, ops, num_ops);
556 static inline uint16_t
560 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
561 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
562 return dev->dequeue_dec_ops(q_data, ops, num_ops);
607 int __rte_experimental
630 int __rte_experimental
650 int __rte_experimental
666 int __rte_experimental
693 int __rte_experimental
bool hardware_accelerated
int __rte_experimental rte_bbdev_close(uint16_t dev_id)
TAILQ_HEAD(rte_bbdev_cb_list, rte_bbdev_callback)
int __rte_experimental rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id)
uint16_t __rte_experimental rte_bbdev_find_next(uint16_t dev_id)
uint64_t dequeue_err_count
uint8_t max_dl_queue_priority
static uint16_t rte_bbdev_dequeue_dec_ops(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_dec_op **ops, uint16_t num_ops)
bool __rte_experimental rte_bbdev_is_valid(uint16_t dev_id)
struct rte_bbdev_driver_info drv
int __rte_experimental rte_bbdev_callback_unregister(uint16_t dev_id, enum rte_bbdev_event_type event, rte_bbdev_cb_fn cb_fn, void *cb_arg)
int __rte_experimental rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id)
int __rte_experimental rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id)
unsigned int max_num_queues
enum rte_bbdev_op_type op_type
int __rte_experimental rte_bbdev_stats_get(uint16_t dev_id, struct rte_bbdev_stats *stats)
static uint16_t rte_bbdev_enqueue_dec_ops(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_dec_op **ops, uint16_t num_ops)
#define RTE_BBDEV_NAME_MAX_LEN
static uint16_t rte_bbdev_dequeue_enc_ops(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_enc_op **ops, uint16_t num_ops)
int __rte_experimental rte_bbdev_queue_info_get(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_queue_info *queue_info)
int __rte_experimental rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id)
struct rte_bbdev_queue_conf conf
uint16_t __rte_experimental rte_bbdev_count(void)
bool queue_intr_supported
int __rte_experimental rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int socket_id)
int __rte_experimental rte_bbdev_stats_reset(uint16_t dev_id)
int __rte_experimental rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op, void *data)
#define __rte_cache_aligned
int __rte_experimental rte_bbdev_intr_enable(uint16_t dev_id)
static uint16_t rte_bbdev_enqueue_enc_ops(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_enc_op **ops, uint16_t num_ops)
int __rte_experimental rte_bbdev_info_get(uint16_t dev_id, struct rte_bbdev_info *dev_info)
int __rte_experimental rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, const struct rte_bbdev_queue_conf *conf)
int __rte_experimental rte_bbdev_start(uint16_t dev_id)
const struct rte_bus * bus
const struct rte_bbdev_op_cap * capabilities
int __rte_experimental rte_bbdev_callback_register(uint16_t dev_id, enum rte_bbdev_event_type event, rte_bbdev_cb_fn cb_fn, void *cb_arg)
struct rte_bbdev_queue_conf default_queue_conf
uint8_t max_ul_queue_priority
int __rte_experimental rte_bbdev_stop(uint16_t dev_id)
enum rte_cpu_flag_t * cpu_flag_reqs
uint64_t enqueue_err_count
void(* rte_bbdev_cb_fn)(uint16_t dev_id, enum rte_bbdev_event_type event, void *cb_arg, void *ret_param)