uint16_trte_bbdev_count(void)
Get the total number of devices that have been successfully initialised.
Returns
The total number of usable devices.
boolrte_bbdev_is_valid(uint16_tdev_id)
Check if a device is valid.
Parametersdev_id The identifier of the device.
Returns
true if device ID is valid and device is attached, false otherwise.
uint16_trte_bbdev_find_next(uint16_tdev_id)
Get the next enabled device.
Parametersdev_id The current device
Returns
• The next device, or
• RTE_BBDEV_MAX_DEVS if none found
intrte_bbdev_setup_queues(uint16_tdev_id,uint16_tnum_queues,intsocket_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.
Parametersdev_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
intrte_bbdev_intr_enable(uint16_tdev_id)
Enable interrupts. This function may be called before starting the device to enable the interrupts if
they are available.
Parametersdev_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
intrte_bbdev_queue_configure(uint16_tdev_id,uint16_tqueue_id,conststructrte_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.
Parametersdev_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
intrte_bbdev_start(uint16_tdev_id)
Start a device. This is the last step needed before enqueueing operations is possible.
Parametersdev_id The identifier of the device.
Returns
• 0 on success
• negative value on failure - as returned from PMD
intrte_bbdev_stop(uint16_tdev_id)
Stop a device. The device can be reconfigured, and restarted after being stopped.
Parametersdev_id The identifier of the device.
Returns
• 0 on success
intrte_bbdev_close(uint16_tdev_id)
Close a device. The device cannot be restarted without reconfiguration!
Parametersdev_id The identifier of the device.
Returns
• 0 on success
intrte_bbdev_queue_start(uint16_tdev_id,uint16_tqueue_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.
Parametersdev_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
intrte_bbdev_queue_stop(uint16_tdev_id,uint16_tqueue_id)
Stop a specified queue on a device, to allow re configuration.
Parametersdev_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
intrte_bbdev_stats_get(uint16_tdev_id,structrte_bbdev_stats*stats)
Retrieve the general I/O statistics of a device.
Parametersdev_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
intrte_bbdev_stats_reset(uint16_tdev_id)
Reset the statistics of a device.
Parametersdev_id The identifier of the device.
Returns
• 0 on success
intrte_bbdev_info_get(uint16_tdev_id,structrte_bbdev_info*dev_info)
Retrieve information about a device.
Parametersdev_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
intrte_bbdev_queue_info_get(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_queue_info*queue_info)
Retrieve information about a specific queue on a device.
Parametersdev_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
staticuint16_trte_bbdev_enqueue_enc_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_enc_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_enqueue_dec_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_dec_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_enqueue_ldpc_enc_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_enc_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_enqueue_ldpc_dec_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_dec_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_enqueue_fft_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_fft_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_enqueue_mldts_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_mldts_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_dequeue_enc_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_enc_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_dequeue_dec_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_dec_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_dequeue_ldpc_enc_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_enc_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_dequeue_ldpc_dec_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_dec_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_dequeue_fft_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_fft_op**ops,uint16_tnum_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.
Parametersdev_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.
staticuint16_trte_bbdev_dequeue_mldts_ops(uint16_tdev_id,uint16_tqueue_id,structrte_bbdev_mldts_op**ops,uint16_tnum_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.
Parametersdev_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.
intrte_bbdev_callback_register(uint16_tdev_id,enumrte_bbdev_event_typeevent,rte_bbdev_cb_fncb_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.
Parametersdev_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.
intrte_bbdev_callback_unregister(uint16_tdev_id,enumrte_bbdev_event_typeevent,rte_bbdev_cb_fncb_fn,void*cb_arg)
Unregister a callback function for specific device id.
Parametersdev_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
intrte_bbdev_queue_intr_enable(uint16_tdev_id,uint16_tqueue_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().
Parametersdev_id The device identifier.
queue_id The index of the queue.
Returns
• 0 on success
• negative value on failure - as returned from PMD
intrte_bbdev_queue_intr_disable(uint16_tdev_id,uint16_tqueue_id)
Disable a one-shot interrupt on the next operation enqueued to a particular queue (if it has been
enabled).
Parametersdev_id The device identifier.
queue_id The index of the queue.
Returns
• 0 on success
• negative value on failure - as returned from PMD
intrte_bbdev_queue_intr_ctl(uint16_tdev_id,uint16_tqueue_id,intepfd,intop,void*data)
Control interface for per-queue interrupts.
Parametersdev_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
constchar*rte_bbdev_device_status_str(enumrte_bbdev_device_statusstatus)
Convert device status from enum to string.
Parametersstatus Device status as enum.
Returns
Device status as string or NULL if invalid.
constchar*rte_bbdev_enqueue_status_str(enumrte_bbdev_enqueue_statusstatus)
Convert queue status from enum to string.
Parametersstatus Queue status as enum.
Returns
Queue status as string or NULL if op_type is invalid.
__rte_experimentalintrte_bbdev_queue_ops_dump(uint16_tdev_id,uint16_tqueue_index,FILE*file)
Dump operations info from device to a file. This API is used for debugging provided input operations, not
a dataplane API.
Parametersdev_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_experimentalchar*rte_bbdev_ops_param_string(void*op,enumrte_bbdev_op_typeop_type,char*str,uint32_tlen)
String of parameters related to the parameters of an operation of a given type.
Parametersop 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.