rte_bbdev.h(3)

πŸ“¦
version 25.11.3 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– rte_bbdev.h πŸ’–

okay bestie, welcome to rte_bbdev.h(3) from the Library Functions Manual β€” this is the wireless base band device abstraction API and it's lowkey iconic, so grab your strawberry milk πŸ“ and let's go.


✨ NAME ✨

rte_bbdev.h β€” the header itself, doing the most, serving wireless base band device abstraction APIs 🌸


🌈 SYNOPSIS 🌈

πŸŽ€ includes, because we're cultured πŸŽ€

#include <stdint.h>
#include <stdbool.h>
#include <rte_compat.h>
#include <rte_cpuflags.h>
#include 'rte_bbdev_op.h'
#include 'rte_bbdev_trace_fp.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()
#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)
__rte_experimental void rte_bbdev_ops_trace (void *op, enum rte_bbdev_op_type op_type)

🌸 Detailed Description 🌸

Wireless base band device abstraction APIs.

This API lets an app discover, configure and use a device to process operations, bestie. It's asynchronous β€” so you enqueue, and then later you dequeue, and that's the whole loop, no cap. πŸ”

⚠️ Vibe check / warning zone: 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 one exception: one thread can enqueue operations to a queue while another thread dequeues from that same queue. That's it. That's the only slay-approved concurrent move. πŸ’…

Definition in file rte_bbdev.h.


✨ Macro Definition Documentation ✨

πŸŽ€ #define RTE_BBDEV_MAX_DEVS 128 πŸŽ€

Max number of devices πŸ’―

Definition at line 38 of file rte_bbdev.h.

πŸŽ€ #define RTE_BBDEV_FOREACH( i) πŸŽ€

Value:

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

Iterate through all enabled devices β€” literally the "for each one of u girlies" of bbdev 🫢

Definition at line 89 of file rte_bbdev.h.

πŸŽ€ #define RTE_BBDEV_END_OF_CAPABILITIES_LIST() πŸŽ€

Value:

{ RTE_BBDEV_OP_NONE }

Macro used at end of bbdev PMD list β€” it's the "okay that's everyone, pack it up" marker 🎬

Definition at line 364 of file rte_bbdev.h.

πŸŽ€ #define RTE_BBDEV_NAME_MAX_LEN 64 πŸŽ€

Max length of device name β€” keep those names short and cute, 64 chars max ✨

Definition at line 479 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 the application callback function that application software registers for notification of device events. Yes, it's your "text me when this happens" function πŸ“²

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 968 of file rte_bbdev.h.


πŸ’œ Enumeration Type Documentation πŸ’œ

🌟 enum rte_bbdev_state 🌟

Flags indicate current state of BBDEV device πŸ‘‘

Definition at line 49 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. So like, size your arrays with that and you're future-proofed, iykyk ✨

Enumerator

  • RTE_BBDEV_ENQ_STATUS_NONE β€” Nothing to report. all good babe 🫢
  • 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 244 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 255 of file rte_bbdev.h.

🌟 enum rte_bbdev_event_type 🌟

Definitions of device event types β€” the group chat notification categories πŸ“¬

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 948 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.

🚨 bestie listen: if any device queues have been configured, their configuration will be cleared by a call to this function. Poof. Gone. So don't call this on a device you've already lovingly configured unless you mean it. 😭

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

rte_bbdev_queue_configure</p> πŸŽ€

int rte_bbdev_queue_configure (uint16_t dev_id, uint16_t queue_id, const struct rte_bbdev_queue_conf * conf)

okay so this one configures a queue on a device πŸ’… you can call it after the device is configured and before you start it. you can also call it while the device or the queue is just chillin in the stopped state. so flexible, we love her.

Parameters

  • dev_id β€” the identifier of the device, bestie.
  • queue_id β€” the index of the queue.
  • conf β€” the queue configuration. and get this, if it's NULL, a default configuration will be used. iconic default behaviour fr fr ✨

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 πŸ’€

rte_bbdev_start πŸ”₯

int rte_bbdev_start (uint16_t dev_id)

starts a device! this is literally the last step you need before enqueueing operations is even possible. main character moment for real πŸ‘‘

Parameters

  • dev_id β€” the identifier of the device.

Returns

  • 0 on success ⭐
  • negative value on failure β€” as returned from PMD 😭

rte_bbdev_stop 🌸

int rte_bbdev_stop (uint16_t dev_id)

stops a device. and the glow-up potential?? the device can be reconfigured and restarted after being stopped. she's not gone, she's just resting πŸ’…

Parameters

  • dev_id β€” the identifier of the device.

Returns

  • 0 on success ✨

rte_bbdev_close πŸ’€

int rte_bbdev_close (uint16_t dev_id)

closes a device. and bestie, be so serious right now β€” the device cannot be restarted without reconfiguration! it's giving permanent. no takebacks. no cap 🫢

Parameters

  • dev_id β€” the identifier of the device.

Returns

  • 0 on success ⭐

rte_bbdev_queue_start πŸ¦‹

int rte_bbdev_queue_start (uint16_t dev_id, uint16_t queue_id)

starts a specified queue on a device. you only need this if the queue has been stopped, or if the deferred_start flag was set when you were configuring the queue. so basically the queue was on pause and now she's back 🌈

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 😭

rte_bbdev_queue_stop πŸ’œ

int rte_bbdev_queue_stop (uint16_t dev_id, uint16_t queue_id)

stops a specified queue on a device, so you can re configure it. it's the queue version of "brb gotta change my outfit" 🧚

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 😭

rte_bbdev_stats_get πŸ“Š

int rte_bbdev_stats_get (uint16_t dev_id, struct rte_bbdev_stats * stats)

pulls the general I/O statistics of a device. the receipts, if you will πŸ’…

Parameters

  • dev_id β€” the identifier of the device.
  • stats β€” pointer to structure to where statistics will be copied. and heads up: on error, this location may or may not have been modified. so don't come for her if it's ambiguous πŸ™ˆ

Returns

  • 0 on success ⭐
  • EINVAL if invalid parameter pointer is provided πŸ’€

rte_bbdev_stats_reset 🌊

int rte_bbdev_stats_reset (uint16_t dev_id)

resets the statistics of a device. fresh start, clean slate, new era ✨

Parameters

  • dev_id β€” the identifier of the device.

Returns

  • 0 on success πŸŽ€

rte_bbdev_info_get ⭐

int rte_bbdev_info_get (uint16_t dev_id, struct rte_bbdev_info * dev_info)

retrieves information about a device. she's an open book, bestie πŸ“–

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. yep, same caveat, same energy πŸ™ˆ

Returns

  • 0 on success πŸ’–
  • EINVAL if invalid parameter pointer is provided πŸ’€

rte_bbdev_queue_info_get πŸŽ€

int rte_bbdev_queue_info_get (uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_queue_info * queue_info)

retrieves information about a specific queue on a device. not the whole device, just that one queue. very targeted, very focused, very slay πŸ‘‘

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 (yes, again, it's a whole thing) 🫢

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. it's literally the group chat member list of callbacks, keeping everyone accounted for πŸ“


rte_bbdev_enqueue_enc_ops πŸ”₯ [inline], [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)

enqueues a burst of processed encode operations to a queue of the device. and okay, key detail: this function only enqueues as many operations as are currently possible β€” it does not block until num_ops entries in the queue are available. so no waiting around, no queuing up dramatically. also it does not provide any error notification, to avoid the corresponding overhead. silent but efficient, we respect it πŸ’…

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 569 of file rte_bbdev.h.


rte_bbdev_enqueue_dec_ops πŸ’œ [inline], [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)

enqueues a burst of processed decode operations to a queue of the device. same deal as her sister: only enqueues as many as currently possible, does not block until num_ops entries are available. and again, no 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 601 of file rte_bbdev.h.


rte_bbdev_enqueue_ldpc_enc_ops πŸ¦‹ [inline], [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)

enqueues a burst of processed encode operations to a queue of the device. yes bestie, it's the LDPC flavor. still only enqueues as many operations as currently possible, still does not block until num_ops entries are available, still no error notification to avoid the corresponding overhead. consistent queen 🌈

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 633 of file rte_bbdev.h.


rte_bbdev_enqueue_ldpc_dec_ops πŸ’› [inline], [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)

enqueues a burst of processed decode operations to a queue of the device β€” the LDPC decode one πŸŽ€ same rules apply: enqueues only as many as currently possible, does not block until num_ops entries in the queue are available, and gives you zero error notification to dodge the 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 665 of file rte_bbdev.h.


rte_bbdev_enqueue_fft_ops 🌊 [inline], [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)

enqueues a burst of FFT operations to a queue of the device. and yeah, same vibe as the rest: it only enqueues as many operations as currently possible and does not block until num_ops entries in the queue are available. no error notification either, 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 697 of file rte_bbdev.h.


rte_bbdev_enqueue_mldts_ops πŸ”₯ [inline], [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)

enqueues a burst of MLDTS operations to a queue of the device. say it with me now: only enqueues as many operations as currently possible, does not block until num_ops entries in the queue are available, no error notification, overhead avoided. πŸ’…

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 729 of file rte_bbdev.h.


rte_bbdev_dequeue_enc_ops πŸ’œ [inline], [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)

dequeues a burst of processed encode operations from a queue of the device. important: this function returns only the current contents of the queue, and does not block until @ num_ops is available. and nope, no error notification, because overhead said no. πŸ™ˆ

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 762 of file rte_bbdev.h.


rte_bbdev_dequeue_dec_ops 🌈 [inline], [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)

dequeues a burst of processed decode operations from a queue of the device. she also returns just the current contents of the queue and does not block until @ num_ops is available. and once more for the people in the back: no error notification, no 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 798 of file rte_bbdev.h.

rte_bbdev_dequeue_ldpc_enc_ops ✨

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]

Grabs a burst of already-processed encode operations off a queue on the device, bestie. Heads up tho β€” this function hands you only whatever is sitting in the queue right this second. It does not block waiting for num_ops to show up. And it silently skips error notification, because who has the time for that overhead, honestly. πŸ’…

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 β€” which is literally just the number of entries copied into the ops array.

Definition at line 833 of file rte_bbdev.h.


rte_bbdev_dequeue_ldpc_dec_ops πŸŽ€

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]

Same energy, but for decode. Dequeues a burst of processed decode operations from a queue of the device. It returns the current contents of the queue and nothing else, no blocking until num_ops is available. And again, no error notification, because overhead said no. 🫢

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 (the number of entries copied into the ops array).

Definition at line 867 of file rte_bbdev.h.


rte_bbdev_dequeue_fft_ops πŸ¦‹

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]

You guessed it β€” FFT edition. Dequeues a burst of FFT operations from a queue of the device. Current queue contents only, no blocking until num_ops is available, and no error notification to dodge the overhead. Iconic behaviour, truly. ✨

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 (the number of entries copied into the ops array).

Definition at line 901 of file rte_bbdev.h.


rte_bbdev_dequeue_mldts_ops 🌸

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]

The MLDTS one, let's go. Dequeues a burst of MLDTS operations from a queue of the device. Returns only the current contents of the queue, does not block until num_ops is available, and provides zero error notification so it can skip that overhead entirely. πŸ“

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 (the number of entries copied into the ops array).

Definition at line 935 of file rte_bbdev.h.


rte_bbdev_callback_register πŸ’–

int rte_bbdev_callback_register (uint16_t dev_id, enum rte_bbdev_event_type event,
    rte_bbdev_cb_fn cb_fn, void * cb_arg)

Registers a callback function for a specific device id. And the best part? You can stack multiple callbacks, and they'll all get called in the exact order you added them whenever an event fires. They run on a separate thread created by the DPDK EAL, so no, they're not chilling on your thread. πŸ‘‘

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. 😭


rte_bbdev_callback_unregister πŸ’€

int rte_bbdev_callback_unregister (uint16_t dev_id, enum rte_bbdev_event_type event,
    rte_bbdev_cb_fn cb_fn, void * cb_arg)

Unregisters a callback function for a specific device id. Breaking up is hard, but it's necessary.

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

rte_bbdev_queue_intr_enable πŸ”₯

int rte_bbdev_queue_intr_enable (uint16_t dev_id, uint16_t queue_id)

Turns on a one-shot interrupt for the next operation enqueued to a particular queue. The interrupt fires once that operation is ready to be dequeued. To actually deal with the interrupt, you register an epoll file descriptor with rte_bbdev_queue_intr_ctl(), and then some application thread or lcore waits it out with rte_epoll_wait(). Periodt. πŸ’…

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

rte_bbdev_queue_intr_disable πŸ™ˆ

int rte_bbdev_queue_intr_disable (uint16_t dev_id, uint16_t queue_id)

Switches off that one-shot interrupt for the next operation enqueued to a particular queue β€” if it had been enabled in the first place, no cap.

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

rte_bbdev_queue_intr_ctl 🧚

int rte_bbdev_queue_intr_ctl (uint16_t dev_id, uint16_t queue_id, int epfd,
    int op, void * data)

The control interface for per-queue interrupts. This is the remote, bestie.

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

rte_bbdev_device_status_str ⭐

const char * rte_bbdev_device_status_str (enum rte_bbdev_device_status status)

Converts a device status from enum to string. Glow-up, but for types. ✨

Parameters

  • status β€” device status as enum.

Returns

Device status as string, or NULL if invalid. 😭


rte_bbdev_enqueue_status_str 🌈

const char * rte_bbdev_enqueue_status_str (enum rte_bbdev_enqueue_status status)

Converts a 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_bbdev_queue_ops_dump πŸ‘‘

__rte_experimental int rte_bbdev_queue_ops_dump (uint16_t dev_id, uint16_t queue_index, FILE * file)

Dumps operations info from the device to a file. Ngl, this API is for debugging the input operations you feed it β€” it is not a dataplane API, so please don't put it on the hot path, bestie. Tagged __rte_experimental, iykyk. πŸ§ͺ

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_bbdev_ops_param_string πŸ’œ

__rte_experimental char * rte_bbdev_ops_param_string (void * op, enum rte_bbdev_op_type op_type,
    char * str, uint32_t len)

Gives you a string of parameters related to the parameters of an operation of a given type. Also __rte_experimental, so tread gently. 🌸

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.


rte_bbdev_ops_trace πŸŽ€

__rte_experimental void rte_bbdev_ops_trace (void * op, enum rte_bbdev_op_type op_type)

Drops a trace with the detail of an operation. Another __rte_experimental one, so peek responsibly. πŸ’…

Parameters

  • op β€” pointer to an operation.
  • op_type β€” operation type enum.

🌟 Author 🌟

Generated automatically by Doxygen for DPDK from the source code. Not me hand-typing it, the robots did that part fr fr. πŸ€–πŸ’–


And that's the whole thing, bestie! This absolute unit of a man page is from DPDK, Version 25.11.3, and it's the rte_bbdev.h(3) page. Go forth and dequeue responsibly. πŸ¦‹βœ¨πŸ’œ

πŸ“¦ where this page comes from