31#include <rte_compat.h>
38#ifndef RTE_BBDEV_MAX_DEVS
39#define RTE_BBDEV_MAX_DEVS 128
83#define RTE_BBDEV_FOREACH(i) for (i = rte_bbdev_find_next(-1); \
84 i < RTE_BBDEV_MAX_DEVS; \
85 i = rte_bbdev_find_next(i))
308#define RTE_BBDEV_END_OF_CAPABILITIES_LIST() \
309 { RTE_BBDEV_OP_NONE }
368struct rte_bbdev_queue_data {
376typedef uint16_t (*rte_bbdev_enqueue_enc_ops_t)(
377 struct rte_bbdev_queue_data *q_data,
382typedef uint16_t (*rte_bbdev_enqueue_dec_ops_t)(
383 struct rte_bbdev_queue_data *q_data,
388typedef uint16_t (*rte_bbdev_dequeue_enc_ops_t)(
389 struct rte_bbdev_queue_data *q_data,
393typedef uint16_t (*rte_bbdev_dequeue_dec_ops_t)(
394 struct rte_bbdev_queue_data *q_data,
397#define RTE_BBDEV_NAME_MAX_LEN 64
405struct rte_bbdev_data {
409 struct rte_bbdev_queue_data *queues;
413 uint16_t process_cnt;
418struct rte_bbdev_callback;
419struct rte_intr_handle;
430 rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops;
432 rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops;
434 rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops;
436 rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops;
438 rte_bbdev_enqueue_enc_ops_t enqueue_ldpc_enc_ops;
440 rte_bbdev_enqueue_dec_ops_t enqueue_ldpc_dec_ops;
442 rte_bbdev_dequeue_enc_ops_t dequeue_ldpc_enc_ops;
444 rte_bbdev_dequeue_dec_ops_t dequeue_ldpc_dec_ops;
446 struct rte_bbdev_data *data;
450 struct rte_bbdev_cb_list list_cbs;
451 struct rte_intr_handle *intr_handle;
455extern struct rte_bbdev rte_bbdev_devices[];
478static inline uint16_t
482 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
483 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
484 return dev->enqueue_enc_ops(q_data, ops, num_ops);
508static inline uint16_t
512 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
513 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
514 return dev->enqueue_dec_ops(q_data, ops, num_ops);
538static inline uint16_t
542 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
543 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
544 return dev->enqueue_ldpc_enc_ops(q_data, ops, num_ops);
568static inline uint16_t
572 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
573 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
574 return dev->enqueue_ldpc_dec_ops(q_data, ops, num_ops);
600static inline uint16_t
604 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
605 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
606 return dev->dequeue_enc_ops(q_data, ops, num_ops);
632static inline uint16_t
636 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
637 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
638 return dev->dequeue_dec_ops(q_data, ops, num_ops);
663static inline uint16_t
667 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
668 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
669 return dev->dequeue_ldpc_enc_ops(q_data, ops, num_ops);
693static inline uint16_t
697 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
698 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
699 return dev->dequeue_ldpc_dec_ops(q_data, ops, num_ops);
int rte_bbdev_start(uint16_t dev_id)
int rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id)
int rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int socket_id)
RTE_TAILQ_HEAD(rte_bbdev_cb_list, rte_bbdev_callback)
int rte_bbdev_callback_register(uint16_t dev_id, enum rte_bbdev_event_type event, rte_bbdev_cb_fn cb_fn, void *cb_arg)
int rte_bbdev_stop(uint16_t dev_id)
int rte_bbdev_close(uint16_t dev_id)
uint16_t rte_bbdev_find_next(uint16_t dev_id)
static uint16_t rte_bbdev_dequeue_ldpc_dec_ops(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_dec_op **ops, uint16_t num_ops)
int rte_bbdev_info_get(uint16_t dev_id, struct rte_bbdev_info *dev_info)
uint16_t rte_bbdev_count(void)
int rte_bbdev_stats_reset(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)
@ RTE_BBDEV_EVENT_DEQUEUE
@ RTE_BBDEV_EVENT_UNKNOWN
int rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, const struct rte_bbdev_queue_conf *conf)
void(* rte_bbdev_cb_fn)(uint16_t dev_id, enum rte_bbdev_event_type event, void *cb_arg, void *ret_param)
static uint16_t rte_bbdev_dequeue_ldpc_enc_ops(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_enc_op **ops, uint16_t num_ops)
int rte_bbdev_queue_info_get(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_queue_info *queue_info)
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)
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)
static uint16_t rte_bbdev_enqueue_ldpc_enc_ops(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_enc_op **ops, uint16_t num_ops)
bool rte_bbdev_is_valid(uint16_t dev_id)
int rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id)
static uint16_t rte_bbdev_enqueue_ldpc_dec_ops(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_dec_op **ops, uint16_t num_ops)
int rte_bbdev_stats_get(uint16_t dev_id, struct rte_bbdev_stats *stats)
int 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_bbdev_intr_enable(uint16_t dev_id)
int rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id)
int rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op, void *data)
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)
int rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id)
#define RTE_BBDEV_NAME_MAX_LEN
#define __rte_cache_aligned
unsigned int max_num_queues
uint8_t max_dl_queue_priority
struct rte_bbdev_queue_conf default_queue_conf
enum rte_cpu_flag_t * cpu_flag_reqs
uint32_t harq_buffer_size
const struct rte_bbdev_op_cap * capabilities
bool queue_intr_supported
uint8_t max_ul_queue_priority
bool hardware_accelerated
struct rte_bbdev_driver_info drv
const struct rte_device * device
enum rte_bbdev_op_type op_type
struct rte_bbdev_queue_conf conf
uint64_t acc_offload_cycles
uint64_t enqueue_err_count
uint64_t dequeue_err_count