*
* Wireless base band device abstraction APIs.
*
- * @warning
- * @b EXPERIMENTAL:
- * All functions in this file may be changed or removed without prior notice.
- *
* This API allows an application to discover, configure and use a device to
* process operations. An asynchronous API (enqueue, followed by later dequeue)
* is used for processing operations.
* @return
* The total number of usable devices.
*/
-__rte_experimental
uint16_t
rte_bbdev_count(void);
* @return
* true if device ID is valid and device is attached, false otherwise.
*/
-__rte_experimental
bool
rte_bbdev_is_valid(uint16_t dev_id);
* - The next device, or
* - RTE_BBDEV_MAX_DEVS if none found
*/
-__rte_experimental
uint16_t
rte_bbdev_find_next(uint16_t dev_id);
* - -EBUSY if the identified device has already started
* - -ENOMEM if unable to allocate memory
*/
-__rte_experimental
int
rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int socket_id);
* - -EBUSY if the identified device has already started
* - -ENOTSUP if the interrupts are not supported by the device
*/
-__rte_experimental
int
rte_bbdev_intr_enable(uint16_t dev_id);
* - EINVAL if the identified queue size or priority are invalid
* - EBUSY if the identified queue or its device have already started
*/
-__rte_experimental
int
rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id,
const struct rte_bbdev_queue_conf *conf);
* - 0 on success
* - negative value on failure - as returned from PMD driver
*/
-__rte_experimental
int
rte_bbdev_start(uint16_t dev_id);
* @return
* - 0 on success
*/
-__rte_experimental
int
rte_bbdev_stop(uint16_t dev_id);
* @return
* - 0 on success
*/
-__rte_experimental
int
rte_bbdev_close(uint16_t dev_id);
* - 0 on success
* - negative value on failure - as returned from PMD driver
*/
-__rte_experimental
int
rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id);
* - 0 on success
* - negative value on failure - as returned from PMD driver
*/
-__rte_experimental
int
rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id);
* - 0 on success
* - EINVAL if invalid parameter pointer is provided
*/
-__rte_experimental
int
rte_bbdev_stats_get(uint16_t dev_id, struct rte_bbdev_stats *stats);
* @return
* - 0 on success
*/
-__rte_experimental
int
rte_bbdev_stats_reset(uint16_t dev_id);
* - 0 on success
* - EINVAL if invalid parameter pointer is provided
*/
-__rte_experimental
int
rte_bbdev_info_get(uint16_t dev_id, struct rte_bbdev_info *dev_info);
* - 0 on success
* - EINVAL if invalid parameter pointer is provided
*/
-__rte_experimental
int
rte_bbdev_queue_info_get(uint16_t dev_id, uint16_t queue_id,
struct rte_bbdev_queue_info *queue_info);
* The number of operations actually enqueued (this is the number of processed
* entries in the @p ops array).
*/
-__rte_experimental
static inline 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)
* The number of operations actually enqueued (this is the number of processed
* entries in the @p ops array).
*/
-__rte_experimental
static inline 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)
* The number of operations actually enqueued (this is the number of processed
* entries in the @p ops array).
*/
-__rte_experimental
static inline 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)
* The number of operations actually enqueued (this is the number of processed
* entries in the @p ops array).
*/
-__rte_experimental
static inline 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)
* The number of operations actually dequeued (this is the number of entries
* copied into the @p ops array).
*/
-__rte_experimental
static inline 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)
* copied into the @p ops array).
*/
-__rte_experimental
static inline 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)
* The number of operations actually dequeued (this is the number of entries
* copied into the @p ops array).
*/
-__rte_experimental
static inline 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)
* The number of operations actually dequeued (this is the number of entries
* copied into the @p ops array).
*/
-__rte_experimental
static inline 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)
* @return
* Zero on success, negative value on failure.
*/
-__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);
* - EINVAL if invalid parameter pointer is provided
* - EAGAIN if the provided callback pointer does not exist
*/
-__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);
* - 0 on success
* - negative value on failure - as returned from PMD driver
*/
-__rte_experimental
int
rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id);
* - 0 on success
* - negative value on failure - as returned from PMD driver
*/
-__rte_experimental
int
rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id);
* - ENOTSUP if interrupts are not supported by the identified device
* - negative value on failure - as returned from PMD driver
*/
-__rte_experimental
int
rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,
void *data);
* @file rte_bbdev_op.h
*
* Defines wireless base band layer 1 operations and capabilities
- *
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
*/
#ifdef __cplusplus
* Operation type as string or NULL if op_type is invalid
*
*/
-__rte_experimental
const char*
rte_bbdev_op_type_str(enum rte_bbdev_op_type op_type);
* - Pointer to a mempool on success,
* - NULL pointer on failure.
*/
-__rte_experimental
struct rte_mempool *
rte_bbdev_op_pool_create(const char *name, enum rte_bbdev_op_type type,
unsigned int num_elements, unsigned int cache_size,
* - 0 on success
* - EINVAL if invalid mempool is provided
*/
-__rte_experimental
static inline int
rte_bbdev_enc_op_alloc_bulk(struct rte_mempool *mempool,
struct rte_bbdev_enc_op **ops, uint16_t num_ops)
* - 0 on success
* - EINVAL if invalid mempool is provided
*/
-__rte_experimental
static inline int
rte_bbdev_dec_op_alloc_bulk(struct rte_mempool *mempool,
struct rte_bbdev_dec_op **ops, uint16_t num_ops)
* @param num_ops
* Number of structures
*/
-__rte_experimental
static inline void
rte_bbdev_dec_op_free_bulk(struct rte_bbdev_dec_op **ops, unsigned int num_ops)
{
* @param num_ops
* Number of structures
*/
-__rte_experimental
static inline void
rte_bbdev_enc_op_free_bulk(struct rte_bbdev_enc_op **ops, unsigned int num_ops)
{