---
name: "rte_bbdev.h"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_bbdev.h"
---

# rte\_bbdev.h(3)

## NAME

rte\_bbdev.h

## SYNOPSIS

`#include <stdint.h>`\
 `#include <stdbool.h>`\
 `#include <rte_compat.h>`\
 `#include <rte_cpuflags.h>`\
 `#include 'rte_bbdev_op.h'`\

### Data Structures

struct **rte\_bbdev\_queue\_conf**\
 struct **rte\_bbdev\_stats**\
 struct **rte\_bbdev\_driver\_info**\
 struct **rte\_bbdev\_info**\
 struct **rte\_bbdev\_queue\_info**\

### Macros

\#define **RTE\_BBDEV\_MAX\_DEVS**   128\
 \#define **RTE\_BBDEV\_FOREACH**(i)\
 \#define **RTE\_BBDEV\_END\_OF\_CAPABILITIES\_LIST**()   	{ **RTE\_BBDEV\_OP\_NONE** }\
 \#define **RTE\_BBDEV\_NAME\_MAX\_LEN**   64\

### Typedefs

**typedef** void(\* **rte\_bbdev\_cb\_fn**) (uint16\_t dev\_id, enum **rte\_bbdev\_event\_type** event, void \*cb\_arg, void \*ret\_param)\

### Enumerations

enum **rte\_bbdev\_state** \
 enum **rte\_bbdev\_enqueue\_status** { **RTE\_BBDEV\_ENQ\_STATUS\_NONE**, **RTE\_BBDEV\_ENQ\_STATUS\_QUEUE\_FULL**, **RTE\_BBDEV\_ENQ\_STATUS\_RING\_FULL**, **RTE\_BBDEV\_ENQ\_STATUS\_INVALID\_OP** }\
 enum **rte\_bbdev\_device\_status** { **RTE\_BBDEV\_DEV\_NOSTATUS**, **RTE\_BBDEV\_DEV\_NOT\_SUPPORTED**, **RTE\_BBDEV\_DEV\_RESET**, **RTE\_BBDEV\_DEV\_CONFIGURED**, **RTE\_BBDEV\_DEV\_ACTIVE**, **RTE\_BBDEV\_DEV\_FATAL\_ERR**, **RTE\_BBDEV\_DEV\_RESTART\_REQ**, **RTE\_BBDEV\_DEV\_RECONFIG\_REQ**, **RTE\_BBDEV\_DEV\_CORRECT\_ERR** }\
 enum **rte\_bbdev\_event\_type** { **RTE\_BBDEV\_EVENT\_UNKNOWN**, **RTE\_BBDEV\_EVENT\_ERROR**, **RTE\_BBDEV\_EVENT\_DEQUEUE**, **RTE\_BBDEV\_EVENT\_MAX** }\

### Functions

uint16\_t **rte\_bbdev\_count** (void)\
 bool **rte\_bbdev\_is\_valid** (uint16\_t dev\_id)\
 uint16\_t **rte\_bbdev\_find\_next** (uint16\_t dev\_id)\
 int **rte\_bbdev\_setup\_queues** (uint16\_t dev\_id, uint16\_t num\_queues, int socket\_id)\
 int **rte\_bbdev\_intr\_enable** (uint16\_t dev\_id)\
 int **rte\_bbdev\_queue\_configure** (uint16\_t dev\_id, uint16\_t queue\_id, const struct **rte\_bbdev\_queue\_conf** \*conf)\
 int **rte\_bbdev\_start** (uint16\_t dev\_id)\
 int **rte\_bbdev\_stop** (uint16\_t dev\_id)\
 int **rte\_bbdev\_close** (uint16\_t dev\_id)\
 int **rte\_bbdev\_queue\_start** (uint16\_t dev\_id, uint16\_t queue\_id)\
 int **rte\_bbdev\_queue\_stop** (uint16\_t dev\_id, uint16\_t queue\_id)\
 int **rte\_bbdev\_stats\_get** (uint16\_t dev\_id, struct **rte\_bbdev\_stats** \*stats)\
 int **rte\_bbdev\_stats\_reset** (uint16\_t dev\_id)\
 int **rte\_bbdev\_info\_get** (uint16\_t dev\_id, struct **rte\_bbdev\_info** \*dev\_info)\
 int **rte\_bbdev\_queue\_info\_get** (uint16\_t dev\_id, uint16\_t queue\_id, struct **rte\_bbdev\_queue\_info** \*queue\_info)\
 **RTE\_TAILQ\_HEAD** (rte\_bbdev\_cb\_list, rte\_bbdev\_callback)\
 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)\
 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)\
 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)\
 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)\
 static uint16\_t **rte\_bbdev\_enqueue\_fft\_ops** (uint16\_t dev\_id, uint16\_t queue\_id, struct **rte\_bbdev\_fft\_op** \*\*ops, uint16\_t num\_ops)\
 static uint16\_t **rte\_bbdev\_enqueue\_mldts\_ops** (uint16\_t dev\_id, uint16\_t queue\_id, struct **rte\_bbdev\_mldts\_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\_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\_ldpc\_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\_dequeue\_ldpc\_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\_fft\_ops** (uint16\_t dev\_id, uint16\_t queue\_id, struct **rte\_bbdev\_fft\_op** \*\*ops, uint16\_t num\_ops)\
 static uint16\_t **rte\_bbdev\_dequeue\_mldts\_ops** (uint16\_t dev\_id, uint16\_t queue\_id, struct **rte\_bbdev\_mldts\_op** \*\*ops, uint16\_t num\_ops)\
 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\_callback\_unregister** (uint16\_t dev\_id, enum **rte\_bbdev\_event\_type** event, **rte\_bbdev\_cb\_fn** cb\_fn, void \*cb\_arg)\
 int **rte\_bbdev\_queue\_intr\_enable** (uint16\_t dev\_id, uint16\_t queue\_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)\
 const char \* **rte\_bbdev\_device\_status\_str** (enum **rte\_bbdev\_device\_status** status)\
 const char \* **rte\_bbdev\_enqueue\_status\_str** (enum **rte\_bbdev\_enqueue\_status** status)\
 \_\_rte\_experimental int **rte\_bbdev\_queue\_ops\_dump** (uint16\_t dev\_id, uint16\_t queue\_index, FILE \*file)\
 \_\_rte\_experimental char \* **rte\_bbdev\_ops\_param\_string** (void \*op, enum **rte\_bbdev\_op\_type** op\_type, char \*str, uint32\_t len)\

## Detailed Description

Wireless base band device abstraction APIs.

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.

The functions in this API are not thread-safe when called on the same target object (a device, or a queue on a device), with the exception that one thread can enqueue operations to a queue while another thread dequeues from the same queue.

Definition in file **rte\_bbdev.h**.

## Macro Definition Documentation

### #define RTE\_BBDEV\_MAX\_DEVS 128

Max number of devices

Definition at line **36** of file **rte\_bbdev.h**.

### #define RTE\_BBDEV\_FOREACH(i)

**Value:**.PP

```
        for (i = rte_bbdev_find_next(-1); \
        i < RTE_BBDEV_MAX_DEVS; \
        i = rte_bbdev_find_next(i))
```

Iterate through all enabled devices

Definition at line **87** of file **rte\_bbdev.h**.

### #define RTE\_BBDEV\_END\_OF\_CAPABILITIES\_LIST() { RTE\_BBDEV\_OP\_NONE }

Macro used at end of bbdev PMD list

Definition at line **362** of file **rte\_bbdev.h**.

### #define RTE\_BBDEV\_NAME\_MAX\_LEN 64

Max length of device name

Definition at line **477** of file **rte\_bbdev.h**.

## Typedef Documentation

### typedef void(\* rte\_bbdev\_cb\_fn) (uint16\_t dev\_id, enum rte\_bbdev\_event\_type event, void \*cb\_arg, void \*ret\_param)

Typedef for application callback function registered by application software for notification of device events

**Parameters**

*dev\_id* Device identifier \
 *event* Device event to register for notification of. \
 *cb\_arg* User specified parameter to be passed to user's callback function. \
 *ret\_param* To pass data back to user application.

Definition at line **930** of file **rte\_bbdev.h**.

## Enumeration Type Documentation

### enum rte\_bbdev\_state

Flags indicate current state of BBDEV device

Definition at line **47** of file **rte\_bbdev.h**.

### enum rte\_bbdev\_enqueue\_status

Flags to indicate the reason why a previous enqueue may not have consumed all requested operations. In case of multiple reasons the latter supersedes a previous one. The related macro RTE\_BBDEV\_ENQ\_STATUS\_SIZE\_MAX can be used as an absolute maximum for notably sizing array while allowing for future enumeration insertion.

**Enumerator**

- *RTE\_BBDEV\_ENQ\_STATUS\_NONE*

  *Nothing to report.*

- *RTE\_BBDEV\_ENQ\_STATUS\_QUEUE\_FULL*

  *Not enough room in queue.*

- *RTE\_BBDEV\_ENQ\_STATUS\_RING\_FULL*

  *Not enough room in ring.*

- *RTE\_BBDEV\_ENQ\_STATUS\_INVALID\_OP*

  *Operation was rejected as invalid.*

*Definition at line* **242** *of file* **rte\_bbdev.h***.*

### enum rte\_bbdev\_device\_status

*Flags to indicate the status of the device.*

**Enumerator**

- *RTE\_BBDEV\_DEV\_NOSTATUS*

  *Nothing being reported.*

- *RTE\_BBDEV\_DEV\_NOT\_SUPPORTED*

  *Device status is not supported on the PMD.*

- *RTE\_BBDEV\_DEV\_RESET*

  *Device in reset and un-configured state.*

- *RTE\_BBDEV\_DEV\_CONFIGURED*

  *Device is configured and ready to use.*

- *RTE\_BBDEV\_DEV\_ACTIVE*

  *Device is configured and VF is being used.*

- *RTE\_BBDEV\_DEV\_FATAL\_ERR*

  *Device has hit a fatal uncorrectable error.*

- *RTE\_BBDEV\_DEV\_RESTART\_REQ*

  *Device requires application to restart.*

- *RTE\_BBDEV\_DEV\_RECONFIG\_REQ*

  *Device requires application to reconfigure queues.*

- *RTE\_BBDEV\_DEV\_CORRECT\_ERR*

  *Warning of a correctable error event happened.*

*Definition at line* **253** *of file* **rte\_bbdev.h***.*

### enum rte\_bbdev\_event\_type

*Definitions of device event types*

**Enumerator**

- *RTE\_BBDEV\_EVENT\_UNKNOWN*

  *unknown event type*

- *RTE\_BBDEV\_EVENT\_ERROR*

  *error interrupt event*

- *RTE\_BBDEV\_EVENT\_DEQUEUE*

  *dequeue event*

- *RTE\_BBDEV\_EVENT\_MAX*

  *max value of this enum*

*Definition at line* **910** *of file* **rte\_bbdev.h***.*

## Function Documentation

### uint16\_t rte\_bbdev\_count (void)

*Get the total number of devices that have been successfully initialised.*

**Returns**

*The total number of usable devices.*

### bool rte\_bbdev\_is\_valid (uint16\_t dev\_id)

*Check if a device is valid.*

**Parameters**

*dev\_id The identifier of the device.*

**Returns**

*true if device ID is valid and device is attached, false otherwise.*

### uint16\_t rte\_bbdev\_find\_next (uint16\_t dev\_id)

*Get the next enabled device.*

**Parameters**

*dev\_id The current device*

**Returns**

- •

  *The next device, or*

- •

  *RTE\_BBDEV\_MAX\_DEVS if none found*

### int rte\_bbdev\_setup\_queues (uint16\_t dev\_id, uint16\_t num\_queues, int socket\_id)

*Setup up device queues. This function must be called on a device before setting up the queues and starting the device. It can also be called when a device is in the stopped state. If any device queues have been configured their configuration will be cleared by a call to this function.*

**Parameters**

*dev\_id The identifier of the device.* \
 *num\_queues Number of queues to configure on device.* \
 *socket\_id ID of a socket which will be used to allocate memory.*

**Returns**

- •

  *0 on success*

- •

  *-ENODEV if dev\_id is invalid or the device is corrupted*

- •

  *-EINVAL if num\_queues is invalid, 0 or greater than maximum*

- •

  *-EBUSY if the identified device has already started*

- •

  *-ENOMEM if unable to allocate memory*

### int rte\_bbdev\_intr\_enable (uint16\_t dev\_id)

*Enable interrupts. This function may be called before starting the device to enable the interrupts if they are available.*

**Parameters**

*dev\_id The identifier of the device.*

**Returns**

- •

  *0 on success*

- •

  *-ENODEV if dev\_id is invalid or the device is corrupted*

- •

  *-EBUSY if the identified device has already started*

- •

  *-ENOTSUP if the interrupts are not supported by the device*

### int rte\_bbdev\_queue\_configure (uint16\_t dev\_id, uint16\_t queue\_id, const struct rte\_bbdev\_queue\_conf \* conf)

*Configure a queue on a device. This function can be called after device configuration, and before starting. It can also be called when the device or the queue is in the stopped state.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *conf The queue configuration. If NULL, a default configuration will be used.*

**Returns**

- •

  *0 on success*

- •

  *EINVAL if the identified queue size or priority are invalid*

- •

  *EBUSY if the identified queue or its device have already started*

### int rte\_bbdev\_start (uint16\_t dev\_id)

*Start a device. This is the last step needed before enqueueing operations is possible.*

**Parameters**

*dev\_id The identifier of the device.*

**Returns**

- •

  *0 on success*

- •

  *negative value on failure - as returned from PMD*

### int rte\_bbdev\_stop (uint16\_t dev\_id)

*Stop a device. The device can be reconfigured, and restarted after being stopped.*

**Parameters**

*dev\_id The identifier of the device.*

**Returns**

- •

  *0 on success*

### int rte\_bbdev\_close (uint16\_t dev\_id)

*Close a device. The device cannot be restarted without reconfiguration!*

**Parameters**

*dev\_id The identifier of the device.*

**Returns**

- •

  *0 on success*

### int rte\_bbdev\_queue\_start (uint16\_t dev\_id, uint16\_t queue\_id)

*Start a specified queue on a device. This is only needed if the queue has been stopped, or if the deferred\_start flag has been set when configuring the queue.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.*

**Returns**

- •

  *0 on success*

- •

  *negative value on failure - as returned from PMD*

### int rte\_bbdev\_queue\_stop (uint16\_t dev\_id, uint16\_t queue\_id)

*Stop a specified queue on a device, to allow re configuration.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.*

**Returns**

- •

  *0 on success*

- •

  *negative value on failure - as returned from PMD*

### int rte\_bbdev\_stats\_get (uint16\_t dev\_id, struct rte\_bbdev\_stats \* stats)

*Retrieve the general I/O statistics of a device.*

**Parameters**

*dev\_id The identifier of the device.* \
 *stats Pointer to structure to where statistics will be copied. On error, this location may or may not have been modified.*

**Returns**

- •

  *0 on success*

- •

  *EINVAL if invalid parameter pointer is provided*

### int rte\_bbdev\_stats\_reset (uint16\_t dev\_id)

*Reset the statistics of a device.*

**Parameters**

*dev\_id The identifier of the device.*

**Returns**

- •

  *0 on success*

### int rte\_bbdev\_info\_get (uint16\_t dev\_id, struct rte\_bbdev\_info \* dev\_info)

*Retrieve information about a device.*

**Parameters**

*dev\_id The identifier of the device.* \
 *dev\_info Pointer to structure to where information will be copied. On error, this location may or may not have been modified.*

**Returns**

- •

  *0 on success*

- •

  *EINVAL if invalid parameter pointer is provided*

### int rte\_bbdev\_queue\_info\_get (uint16\_t dev\_id, uint16\_t queue\_id, struct rte\_bbdev\_queue\_info \* queue\_info)

*Retrieve information about a specific queue on a device.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *queue\_info Pointer to structure to where information will be copied. On error, this location may or may not have been modified.*

**Returns**

- •

  *0 on success*

- •

  *EINVAL if invalid parameter pointer is provided*

### RTE\_TAILQ\_HEAD (rte\_bbdev\_cb\_list, rte\_bbdev\_callback)

*Structure to keep track of registered callbacks*

### 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)` [inline]`, ` [static]`

*Enqueue a burst of processed encode operations to a queue of the device. This functions only enqueues as many operations as currently possible and does not block until* `num_ops` *entries in the queue are available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array containing operations to be enqueued Must have at least* `num_ops` *entries* \
 *num\_ops The maximum number of operations to enqueue.*

**Returns**

*The number of operations actually enqueued (this is the number of processed entries in the* `ops` *array).*

*Definition at line* **567** *of file* **rte\_bbdev.h***.*

### 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)` [inline]`, ` [static]`

*Enqueue a burst of processed decode operations to a queue of the device. This functions only enqueues as many operations as currently possible and does not block until* `num_ops` *entries in the queue are available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array containing operations to be enqueued Must have at least* `num_ops` *entries* \
 *num\_ops The maximum number of operations to enqueue.*

**Returns**

*The number of operations actually enqueued (this is the number of processed entries in the* `ops` *array).*

*Definition at line* **597** *of file* **rte\_bbdev.h***.*

### 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)` [inline]`, ` [static]`

*Enqueue a burst of processed encode operations to a queue of the device. This functions only enqueues as many operations as currently possible and does not block until* `num_ops` *entries in the queue are available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array containing operations to be enqueued Must have at least* `num_ops` *entries* \
 *num\_ops The maximum number of operations to enqueue.*

**Returns**

*The number of operations actually enqueued (this is the number of processed entries in the* `ops` *array).*

*Definition at line* **627** *of file* **rte\_bbdev.h***.*

### 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)` [inline]`, ` [static]`

*Enqueue a burst of processed decode operations to a queue of the device. This functions only enqueues as many operations as currently possible and does not block until* `num_ops` *entries in the queue are available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array containing operations to be enqueued Must have at least* `num_ops` *entries* \
 *num\_ops The maximum number of operations to enqueue.*

**Returns**

*The number of operations actually enqueued (this is the number of processed entries in the* `ops` *array).*

*Definition at line* **657** *of file* **rte\_bbdev.h***.*

### static uint16\_t rte\_bbdev\_enqueue\_fft\_ops (uint16\_t dev\_id, uint16\_t queue\_id, struct rte\_bbdev\_fft\_op \*\* ops, uint16\_t num\_ops)` [inline]`, ` [static]`

*Enqueue a burst of FFT operations to a queue of the device. This functions only enqueues as many operations as currently possible and does not block until* `num_ops` *entries in the queue are available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array containing operations to be enqueued. Must have at least* `num_ops` *entries.* \
 *num\_ops The maximum number of operations to enqueue.*

**Returns**

*The number of operations actually enqueued. (This is the number of processed entries in the* `ops` *array.)*

*Definition at line* **687** *of file* **rte\_bbdev.h***.*

### static uint16\_t rte\_bbdev\_enqueue\_mldts\_ops (uint16\_t dev\_id, uint16\_t queue\_id, struct rte\_bbdev\_mldts\_op \*\* ops, uint16\_t num\_ops)` [inline]`, ` [static]`

*Enqueue a burst of MLDTS operations to a queue of the device. This functions only enqueues as many operations as currently possible and does not block until* `num_ops` *entries in the queue are available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array containing operations to be enqueued Must have at least* `num_ops` *entries* \
 *num\_ops The maximum number of operations to enqueue.*

**Returns**

*The number of operations actually enqueued (this is the number of processed entries in the* `ops` *array).*

*Definition at line* **717** *of file* **rte\_bbdev.h***.*

### 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)` [inline]`, ` [static]`

*Dequeue a burst of processed encode operations from a queue of the device. This functions returns only the current contents of the queue, and does not block until @ num\_ops is available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array where operations will be dequeued to. Must have at least* `num_ops` *entries, i.e. a pointer to a table of void \* pointers (ops) that will be filled.* \
 *num\_ops The maximum number of operations to dequeue.*

**Returns**

*The number of operations actually dequeued. (This is the number of entries copied into the* `ops` *array.)*

*Definition at line* **748** *of file* **rte\_bbdev.h***.*

### 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)` [inline]`, ` [static]`

*Dequeue a burst of processed decode operations from a queue of the device. This functions returns only the current contents of the queue, and does not block until @ num\_ops is available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array where operations will be dequeued to. Must have at least* `num_ops` *entries ie. A pointer to a table of void \* pointers (ops) that will be filled.* \
 *num\_ops The maximum number of operations to dequeue.*

**Returns**

*The number of operations actually dequeued (this is the number of entries copied into the* `ops` *array).*

*Definition at line* **780** *of file* **rte\_bbdev.h***.*

### 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)` [inline]`, ` [static]`

*Dequeue a burst of processed encode operations from a queue of the device. This functions returns only the current contents of the queue, and does not block until @ num\_ops is available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array where operations will be dequeued to. Must have at least* `num_ops` *entries* \
 *num\_ops The maximum number of operations to dequeue.*

**Returns**

*The number of operations actually dequeued (this is the number of entries copied into the* `ops` *array).*

*Definition at line* **811** *of file* **rte\_bbdev.h***.*

### 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)` [inline]`, ` [static]`

*Dequeue a burst of processed decode operations from a queue of the device. This functions returns only the current contents of the queue, and does not block until @ num\_ops is available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array where operations will be dequeued to. Must have at least* `num_ops` *entries* \
 *num\_ops The maximum number of operations to dequeue.*

**Returns**

*The number of operations actually dequeued (this is the number of entries copied into the* `ops` *array).*

*Definition at line* **841** *of file* **rte\_bbdev.h***.*

### static uint16\_t rte\_bbdev\_dequeue\_fft\_ops (uint16\_t dev\_id, uint16\_t queue\_id, struct rte\_bbdev\_fft\_op \*\* ops, uint16\_t num\_ops)` [inline]`, ` [static]`

*Dequeue a burst of FFT operations from a queue of the device. This functions returns only the current contents of the queue, and does not block until @ num\_ops is available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array where operations will be dequeued to. Must have at least* `num_ops` *entries* \
 *num\_ops The maximum number of operations to dequeue.*

**Returns**

*The number of operations actually dequeued (this is the number of entries copied into the* `ops` *array).*

*Definition at line* **871** *of file* **rte\_bbdev.h***.*

### static uint16\_t rte\_bbdev\_dequeue\_mldts\_ops (uint16\_t dev\_id, uint16\_t queue\_id, struct rte\_bbdev\_mldts\_op \*\* ops, uint16\_t num\_ops)` [inline]`, ` [static]`

*Dequeue a burst of MLDTS operations from a queue of the device. This functions returns only the current contents of the queue, and does not block until* `num_ops` *is available. This function does not provide any error notification to avoid the corresponding overhead.*

**Parameters**

*dev\_id The identifier of the device.* \
 *queue\_id The index of the queue.* \
 *ops Pointer array where operations will be dequeued to. Must have at least* `num_ops` *entries* \
 *num\_ops The maximum number of operations to dequeue.*

**Returns**

*The number of operations actually dequeued (this is the number of entries copied into the* `ops` *array).*

*Definition at line* **901** *of file* **rte\_bbdev.h***.*

### int rte\_bbdev\_callback\_register (uint16\_t dev\_id, enum rte\_bbdev\_event\_type event, rte\_bbdev\_cb\_fn cb\_fn, void \* cb\_arg)

*Register a callback function for specific device id. Multiple callbacks can be added and will be called in the order they are added when an event is triggered. Callbacks are called in a separate thread created by the DPDK EAL.*

**Parameters**

*dev\_id Device id.* \
 *event The event that the callback will be registered for.* \
 *cb\_fn User supplied callback function to be called.* \
 *cb\_arg Pointer to parameter that will be passed to the callback.*

**Returns**

*Zero on success, negative value on failure.*

### int rte\_bbdev\_callback\_unregister (uint16\_t dev\_id, enum rte\_bbdev\_event\_type event, rte\_bbdev\_cb\_fn cb\_fn, void \* cb\_arg)

*Unregister a callback function for specific device id.*

**Parameters**

*dev\_id The device identifier.* \
 *event The event that the callback will be unregistered for.* \
 *cb\_fn User supplied callback function to be unregistered.* \
 *cb\_arg Pointer to the parameter supplied when registering the callback. (void \*)-1 means to remove all registered callbacks with the specified function address.*

**Returns**

- •

  *0 on success*

- •

  *EINVAL if invalid parameter pointer is provided*

- •

  *EAGAIN if the provided callback pointer does not exist*

### int rte\_bbdev\_queue\_intr\_enable (uint16\_t dev\_id, uint16\_t queue\_id)

*Enable a one-shot interrupt on the next operation enqueued to a particular queue. The interrupt will be triggered when the operation is ready to be dequeued. To handle the interrupt, an epoll file descriptor must be registered using* **rte\_bbdev\_queue\_intr\_ctl()***, and then an application thread/lcore can wait for the interrupt using* **rte\_epoll\_wait()***.*

**Parameters**

*dev\_id The device identifier.* \
 *queue\_id The index of the queue.*

**Returns**

- •

  *0 on success*

- •

  *negative value on failure - as returned from PMD*

### int rte\_bbdev\_queue\_intr\_disable (uint16\_t dev\_id, uint16\_t queue\_id)

*Disable a one-shot interrupt on the next operation enqueued to a particular queue (if it has been enabled).*

**Parameters**

*dev\_id The device identifier.* \
 *queue\_id The index of the queue.*

**Returns**

- •

  *0 on success*

- •

  *negative value on failure - as returned from PMD*

### int rte\_bbdev\_queue\_intr\_ctl (uint16\_t dev\_id, uint16\_t queue\_id, int epfd, int op, void \* data)

*Control interface for per-queue interrupts.*

**Parameters**

*dev\_id The device identifier.* \
 *queue\_id The index of the queue.* \
 *epfd Epoll file descriptor that will be associated with the interrupt source. If the special value RTE\_EPOLL\_PER\_THREAD is provided, a per thread epoll file descriptor created by the EAL is used (RTE\_EPOLL\_PER\_THREAD can also be used when calling* **rte\_epoll\_wait()***).* \
 *op The operation be performed for the vector.RTE\_INTR\_EVENT\_ADD or RTE\_INTR\_EVENT\_DEL.* \
 *data User context, that will be returned in the epdata.data field of the* **rte\_epoll\_event** *structure filled in by* **rte\_epoll\_wait()***.*

**Returns**

- •

  *0 on success*

- •

  *ENOTSUP if interrupts are not supported by the identified device*

- •

  *negative value on failure - as returned from PMD*

### const char \* rte\_bbdev\_device\_status\_str (enum rte\_bbdev\_device\_status status)

*Convert device status from enum to string.*

**Parameters**

*status Device status as enum.*

**Returns**

*Device status as string or NULL if invalid.*

### const char \* rte\_bbdev\_enqueue\_status\_str (enum rte\_bbdev\_enqueue\_status status)

*Convert queue status from enum to string.*

**Parameters**

*status Queue status as enum.*

**Returns**

*Queue status as string or NULL if op\_type is invalid.*

### \_\_rte\_experimental int rte\_bbdev\_queue\_ops\_dump (uint16\_t dev\_id, uint16\_t queue\_index, FILE \* file)

*Dump operations info from device to a file. This API is used for debugging provided input operations, not a dataplane API.*

**Parameters**

*dev\_id The device identifier.*\
 *queue\_index Index of queue.*\
 *file A pointer to a file for output.*

**Returns**

- •

  *0 on success*

- •

  *ENOTSUP if interrupts are not supported by the identified device*

- •

  *negative value on failure - as returned from PMD*

### \_\_rte\_experimental char \* rte\_bbdev\_ops\_param\_string (void \* op, enum rte\_bbdev\_op\_type op\_type, char \* str, uint32\_t len)

*String of parameters related to the parameters of an operation of a given type.*

**Parameters**

*op Pointer to an operation.*\
 *op\_type Operation type enum.*\
 *str String being describing the operations.*\
 *len Size of the string buffer.*

**Returns**

*String describing the provided operation.*

## Author

*Generated automatically by Doxygen for DPDK from the source code.*
