35 #include <rte_compat.h>
42 #ifndef RTE_BBDEV_MAX_DEVS
43 #define RTE_BBDEV_MAX_DEVS 128
90 #define RTE_BBDEV_FOREACH(i) for (i = rte_bbdev_find_next(-1); \
91 i < RTE_BBDEV_MAX_DEVS; \
92 i = rte_bbdev_find_next(i))
321 #define RTE_BBDEV_END_OF_CAPABILITIES_LIST() \
322 { RTE_BBDEV_OP_NONE }
383 struct rte_bbdev_queue_data {
391 typedef uint16_t (*rte_bbdev_enqueue_enc_ops_t)(
392 struct rte_bbdev_queue_data *q_data,
397 typedef uint16_t (*rte_bbdev_enqueue_dec_ops_t)(
398 struct rte_bbdev_queue_data *q_data,
403 typedef uint16_t (*rte_bbdev_dequeue_enc_ops_t)(
404 struct rte_bbdev_queue_data *q_data,
408 typedef uint16_t (*rte_bbdev_dequeue_dec_ops_t)(
409 struct rte_bbdev_queue_data *q_data,
412 #define RTE_BBDEV_NAME_MAX_LEN 64
420 struct rte_bbdev_data {
424 struct rte_bbdev_queue_data *queues;
428 uint16_t process_cnt;
433 struct rte_bbdev_callback;
437 TAILQ_HEAD(rte_bbdev_cb_list, rte_bbdev_callback);
445 rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops;
447 rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops;
449 rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops;
451 rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops;
453 rte_bbdev_enqueue_enc_ops_t enqueue_ldpc_enc_ops;
455 rte_bbdev_enqueue_dec_ops_t enqueue_ldpc_dec_ops;
457 rte_bbdev_dequeue_enc_ops_t dequeue_ldpc_enc_ops;
459 rte_bbdev_dequeue_dec_ops_t dequeue_ldpc_dec_ops;
461 struct rte_bbdev_data *data;
465 struct rte_bbdev_cb_list list_cbs;
470 extern struct rte_bbdev rte_bbdev_devices[];
494 static inline uint16_t
498 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
499 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
500 return dev->enqueue_enc_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->enqueue_dec_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->enqueue_ldpc_enc_ops(q_data, ops, num_ops);
587 static inline uint16_t
591 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
592 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
593 return dev->enqueue_ldpc_dec_ops(q_data, ops, num_ops);
620 static inline uint16_t
624 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
625 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
626 return dev->dequeue_enc_ops(q_data, ops, num_ops);
653 static inline uint16_t
657 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
658 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
659 return dev->dequeue_dec_ops(q_data, ops, num_ops);
685 static inline uint16_t
689 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
690 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
691 return dev->dequeue_ldpc_enc_ops(q_data, ops, num_ops);
716 static inline uint16_t
720 struct rte_bbdev *dev = &rte_bbdev_devices[dev_id];
721 struct rte_bbdev_queue_data *q_data = &dev->data->queues[queue_id];
722 return dev->dequeue_ldpc_dec_ops(q_data, ops, num_ops);
bool hardware_accelerated
uint64_t acc_offload_cycles
__rte_experimental int rte_bbdev_info_get(uint16_t dev_id, struct rte_bbdev_info *dev_info)
__rte_experimental int rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id)
TAILQ_HEAD(rte_bbdev_cb_list, rte_bbdev_callback)
__rte_experimental int rte_bbdev_intr_enable(uint16_t dev_id)
uint64_t dequeue_err_count
__rte_experimental int rte_bbdev_callback_register(uint16_t dev_id, enum rte_bbdev_event_type event, rte_bbdev_cb_fn cb_fn, void *cb_arg)
uint32_t harq_buffer_size
uint8_t max_dl_queue_priority
static __rte_experimental 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)
struct rte_bbdev_driver_info drv
__rte_experimental int rte_bbdev_stats_get(uint16_t dev_id, struct rte_bbdev_stats *stats)
static __rte_experimental 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)
unsigned int max_num_queues
enum rte_bbdev_op_type op_type
__rte_experimental int rte_bbdev_stats_reset(uint16_t dev_id)
static __rte_experimental 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)
__rte_experimental int rte_bbdev_queue_info_get(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_queue_info *queue_info)
__rte_experimental int rte_bbdev_callback_unregister(uint16_t dev_id, enum rte_bbdev_event_type event, rte_bbdev_cb_fn cb_fn, void *cb_arg)
__rte_experimental int rte_bbdev_close(uint16_t dev_id)
static __rte_experimental 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)
__rte_experimental int rte_bbdev_stop(uint16_t dev_id)
__rte_experimental int rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id)
#define RTE_BBDEV_NAME_MAX_LEN
#define __rte_cache_aligned
struct rte_bbdev_queue_conf conf
__rte_experimental int rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, const struct rte_bbdev_queue_conf *conf)
bool queue_intr_supported
__rte_experimental int rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op, void *data)
__rte_experimental int rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id)
__rte_experimental uint16_t rte_bbdev_find_next(uint16_t dev_id)
static __rte_experimental 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)
static __rte_experimental 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)
__rte_experimental uint16_t rte_bbdev_count(void)
const struct rte_device * device
__rte_experimental int rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id)
__rte_experimental int rte_bbdev_start(uint16_t dev_id)
static __rte_experimental 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)
__rte_experimental int rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int socket_id)
const struct rte_bbdev_op_cap * capabilities
static __rte_experimental 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)
struct rte_bbdev_queue_conf default_queue_conf
uint8_t max_ul_queue_priority
enum rte_cpu_flag_t * cpu_flag_reqs
__rte_experimental bool rte_bbdev_is_valid(uint16_t dev_id)
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)