rte_event_..._adapter.h(3)
π rte_event_vector_adapter.h π
okay bestie, welcome to the Library Functions Manual page for rte_event_vector_adapter.h β yes the title line said rte_event_..._adapter.h(3) but bestie the middle part got squished, it's the vector adapter header file, we stan a dramatically abbreviated title π
β¨ NAME β¨
rte_event_vector_adapter.h β literally just the name, that's the whole section, slay
π¦ SYNOPSIS π¦
#include <rte_eventdev.h>
πΈ Data Structures πΈ
struct rte_event_vector_adapter_confstruct rte_event_vector_adapter_infostruct rte_event_vector_adapter_statsstruct rte_event_vector_adapter
π Macros π
#define RTE_EVENT_VECTOR_ADAPTER_CAP_SOV_EOV RTE_BIT64(0)#define RTE_EVENT_VECTOR_ENQ_SOV RTE_BIT64(0)#define RTE_EVENT_VECTOR_ENQ_EOV RTE_BIT64(1)#define RTE_EVENT_VECTOR_ENQ_FLUSH RTE_BIT64(2)
π Typedefs π
typedef int(* rte_event_vector_adapter_port_conf_cb_t) (uint8_t
event_dev_id, uint8_t *event_port_id, void *conf_arg)
β Functions β
__rte_experimental struct rte_event_vector_adapter *rte_event_vector_adapter_create (const struct rte_event_vector_adapter_conf *conf)__rte_experimental struct rte_event_vector_adapter *rte_event_vector_adapter_create_ext (const struct rte_event_vector_adapter_conf *conf, rte_event_vector_adapter_port_conf_cb_t conf_cb, void *conf_arg)__rte_experimental struct rte_event_vector_adapter *rte_event_vector_adapter_lookup (uint32_t adapter_id)__rte_experimental int rte_event_vector_adapter_destroy (struct rte_event_vector_adapter *adapter)__rte_experimental int rte_event_vector_adapter_info_get (uint8_t event_dev_id, struct rte_event_vector_adapter_info *info)__rte_experimental int rte_event_vector_adapter_conf_get (struct rte_event_vector_adapter *adapter, struct rte_event_vector_adapter_conf *conf)__rte_experimental uint8_t rte_event_vector_adapter_remaining (uint8_t event_dev_id, uint8_t event_queue_id)__rte_experimental int rte_event_vector_adapter_stats_get (struct rte_event_vector_adapter *adapter, struct rte_event_vector_adapter_stats *stats)__rte_experimental int rte_event_vector_adapter_stats_reset (struct rte_event_vector_adapter *adapter)__rte_experimental int rte_event_vector_adapter_service_id_get (struct rte_event_vector_adapter *adapter, uint32_t *service_id)static __rte_experimental int rte_event_vector_adapter_enqueue (struct rte_event_vector_adapter *adapter, uint64_t objs[], uint16_t num_elem, uint64_t flags)
π Detailed Description π
β οΈ Warning β οΈ EXPERIMENTAL: All functions in this file may be changed or removed without prior notice. no cap, they can literally ghost these functions whenever, so don't get too attached π
Event vector adapter API.
An event vector adapter has the following working model:
ββββββββββββ
β Vector βββ
---[1]--->β adapter 0β β [1] rte_event_vector_adapter_enqueue()
ββββββββββββ β
ββββββββββββ β ββββββββββββ
β Vector βββΌββ>β Event β
---[1]--->β adapter 1β β β Queue 0 β
ββββββββββββ β ββββββββββββ
ββββββββββββ β
β Vector βββ
---[1]--->β adapter nβ
ββββββββββββ
- A vector adapter can be seen as an extension to event queue. It helps in aggregating objects and generating a vector event which is enqueued to the event queue. it's giving event queue's cooler younger sibling β¨
- Multiple vector adapters can be created on an event queue, each with its own unique properties such as event properties, vector size, and timeout. Note: If the target event queue doesn't support
RTE_EVENT_QUEUE_CFG_ALL_TYPES, then the vector adapter should use the same schedule type as the event queue. bestie don't fight the queue's type okay, match the vibe π«Ά - Each vector adapter aggregates 8B objects, generates a vector event and enqueues it to the event queue with the event properties mentioned in
rte_event_vector_adapter_conf::ev. - After configuring the vector adapter, Application needs to use the
rte_event_vector_adapter_enqueue()function to enqueue objects i.e., mbufs/ptrs/u64s to the vector adapter. On reaching the configured vector size or timeout, the vector adapter enqueues the event vector to the event queue. Note: Application should use theevent_typeandsub_event_typeproperly identifying the contents of vector event on dequeue. like pls label ur stuff, it's the respectful thing to do π - If the vector adapter advertises the
RTE_EVENT_VECTOR_ADAPTER_CAP_SOV_EOVcapability, application can use theRTE_EVENT_VECTOR_ENQ_[S|E]OVflags to indicate the start and end of a vector event.- When
RTE_EVENT_VECTOR_ENQ_SOVis set, the vector adapter will flush any aggregation in-progress and start aggregating a new vector event with the enqueued objects. - When
RTE_EVENT_VECTOR_ENQ_EOVis set, the vector adapter will add the objects enqueued to the in-progress aggregation and enqueue the vector event to the event queue, even if configured vector size or timeout is not reached. - If both flags are set, the vector adapter will flush any aggregation in progress and enqueue the objects as a new vector event to the event queue.
- When
- If the vector adapter reaches the configured vector size, it will enqueue the aggregated vector event to the event queue.
- If the vector adapter reaches the configured vector timeout, it will flush the aggregated objects as a vector event if the minimum vector size is reached, if not it will enqueue the objs as single events to the event queue.
- If the vector adapter is unable to aggregate the objs into a vector event, it will enqueue the objs as single events to the event queue with the event properties mentioned in
rte_event_vector_adapter_conf::ev_fallback. fallback era, we love a plan B π
Before using the vector adapter, the application has to create and configure an event device and based on the event device capability it might require creating an additional event port.
When the application creates the vector adapter using the rte_event_vector_adapter_create() function, the event device driver capabilities are checked. If an in-built port is absent, the application uses the default function to create a new event port. For finer control over event port creation, the application should use the rte_event_vector_adapter_create_ext() function. finer control = create_ext, that's the whole tea β
The application can enqueue one or more objs to the vector adapter using the rte_event_vector_adapter_enqueue() function and control the aggregation using the flags.
Vector adapters report stats using the rte_event_vector_adapter_stats_get() function and reset the stats using the rte_event_vector_adapter_stats_reset().
The application can destroy the vector adapter using the rte_event_vector_adapter_destroy() function. bye bestie π
Definition in file rte_event_vector_adapter.h.
πΈ Macro Definition Documentation πΈ
π #define RTE_EVENT_VECTOR_ADAPTER_CAP_SOV_EOV RTE_BIT64(0) π
Vector adapter supports Start of Vector (SOV) and End of Vector (EOV) flags in the enqueue flags.
See also
RTE_EVENT_VECTOR_ENQ_SOVRTE_EVENT_VECTOR_ENQ_EOV
Definition at line 109 of file rte_event_vector_adapter.h.
π #define RTE_EVENT_VECTOR_ENQ_SOV RTE_BIT64(0) π
Indicates the start of a vector event. When enqueue is called with RTE_EVENT_VECTOR_ENQ_SOV, the vector adapter will flush any vector aggregation in progress and start aggregating a new vector event with the enqueued objects. fresh start energy, we're clearing the cache and starting over β¨
See also
RTE_EVENT_VECTOR_ADAPTER_CAP_SOV_EOV
Definition at line 117 of file rte_event_vector_adapter.h.
π₯ #define RTE_EVENT_VECTOR_ENQ_EOV RTE_BIT64(1) π₯
Indicates the end of a vector event. When enqueue is called with RTE_EVENT_VECTOR_ENQ_EOV, the vector adapter will add the objects to any inprogress aggregation and flush the event vector. and that's a wrap, sending it to the queue π
See also
RTE_EVENT_VECTOR_ADAPTER_CAP_SOV_EOV
Definition at line 124 of file rte_event_vector_adapter.h.
π¦ #define RTE_EVENT_VECTOR_ENQ_FLUSH RTE_BIT64(2) π¦
Flush any in-progress vector aggregation. just yeet whatever's sitting there, immediately π¨
Definition at line 130 of file rte_event_vector_adapter.h.
π Typedef Documentation π
π typedef int(* rte_event_vector_adapter_port_conf_cb_t) (uint8_t event_dev_id, uint8_t *event_port_id, void *conf_arg) π
Callback function type for producer port creation.
Definition at line 245 of file rte_event_vector_adapter.h.
β¨ part 1 done, but bestie there's MORE β¨ keep scrolling, we're not done yet π«Ά
π FUNCTION DOCUMENTATION π
okay bestie, this is the part where we meet the actual functions. every single one of them. no skipping, we're doing the full run. π
πΈ rte_event_vector_adapter_create πΈ
__rte_experimental struct rte_event_vector_adapter *
rte_event_vector_adapter_create (const struct
rte_event_vector_adapter_conf * conf)
Create an event vector adapter.
so this one literally builds you a whole event vector adapter from the config you hand it. iconic. the adapter's whole job is to take a bunch of mbufs/ptrs/u64s and squish them into a single vector event β that's an rte_event_vector β which then gets enqueued to the event queue you set up. π¦
See also: rte_event_vector_adapter_conf::ev::queue_id (go look at the config for the queue id, iykyk)
Parameters
confβ the configuration for the event vector adapter.
Returns π
- Pointer to the created event vector adapter on success. slay!
NULLon failure, andrte_errnogets set to the error code. the possiblerte_errnovalues are:EINVAL: you gave an invalid event device identifier in the config. rude of you, honestly.ENOMEM: couldn't allocate enough memory for the adapter instances. πENOSPC: the maximum number of adapters are already created. capacity is FULL, bestie.
β¨ rte_event_vector_adapter_create_ext β¨
__rte_experimental struct rte_event_vector_adapter *
rte_event_vector_adapter_create_ext (const struct
rte_event_vector_adapter_conf * conf,
rte_event_vector_adapter_port_conf_cb_t conf_cb, void * conf_arg)
Create an event vector adapter with the supplied callback.
this is the fancy version of create. you use it when you want more granular control over how the event vector adapter gets made. if there's no built-in port available, it'll use the callback you provide to create the port and get the port id that's gonna be used as the producer port. π
Parameters
confβ the event vector adapter configuration structure.conf_cbβ the port config callback function.conf_argβ an opaque pointer to the argument for the callback function.
Returns πΈ
- Pointer to the new allocated event vector adapter on success.
NULLon error, withrte_errnoset appropriately. possiblerte_errnovalues are:ERANGE:vector_timeout_nsisn't in the supported range.ENOMEM: couldn't allocate enough memory for the adapter instances.EINVAL: invalid event device identifier specified in config.ENOSPC: maximum number of adapters already created.
π rte_event_vector_adapter_lookup π
__rte_experimental struct rte_event_vector_adapter *
rte_event_vector_adapter_lookup (uint32_t adapter_id)
Lookup an event vector adapter using its identifier.
you give it the adapter_id and it gives you back the event vector adapter. super handy when the adapter was created over in another process and your app wants to use it here in the current process. multithread/multiprocess queen behaviour. π
Parameters
adapter_idβ identifier of the event vector adapter to look up.
Returns
- Pointer to the event vector adapter on success.
NULLif the adapter is not found. π
π rte_event_vector_adapter_destroy π
__rte_experimental int rte_event_vector_adapter_destroy (struct
rte_event_vector_adapter * adapter)
Destroy an event vector adapter.
releases all the resources tied to that event vector adapter. it's the cleanup era, we love a tidy bestie. β¨
Parameters
adapterβ pointer to the event vector adapter to be destroyed.
Returns
0on success.- Negative value on failure, with
rte_errnoset to the error code.
π¦ rte_event_vector_adapter_info_get π¦
__rte_experimental int rte_event_vector_adapter_info_get (uint8_t
event_dev_id, struct rte_event_vector_adapter_info * info)
Get the vector info of an event vector adapter.
pulls up the vector info for the event vector adapter. it's giving β¨just checking the vibesβ¨ of your adapter.
Parameters
event_dev_idβ event device identifier.infoβ pointer to the structure where the vector info will be stored.
Returns 0 on success, negative value on failure.
EINVALif the event device identifier is invalid.ENOTSUPif the event device does not support vector adapters. π
π rte_event_vector_adapter_conf_get π
__rte_experimental int rte_event_vector_adapter_conf_get (struct
rte_event_vector_adapter * adapter, struct rte_event_vector_adapter_conf
* conf)
Get the configuration of an event vector adapter.
it retrieves the configuration of the event vector adapter, so you can see how it was set up. receipts, basically. π
Parameters
adapterβ pointer to the event vector adapter.confβ pointer to the structure where the configuration will be stored.
Returns 0 on success, negative value on failure.
β rte_event_vector_adapter_remaining β
__rte_experimental uint8_t rte_event_vector_adapter_remaining (uint8_t
event_dev_id, uint8_t event_queue_id)
Get the remaining event vector adapters.
this tells you how many event vector adapters are still available for a given event device and event queue. inventory check bestie, we love to know. π«Ά
Parameters
event_dev_idβ event device identifier.event_queue_idβ event queue identifier.
Returns number of remaining slots available for enqueuing events.
π rte_event_vector_adapter_stats_get π
__rte_experimental int rte_event_vector_adapter_stats_get (struct
rte_event_vector_adapter * adapter, struct
rte_event_vector_adapter_stats * stats)
Get the event vector adapter statistics.
gets you the statistics of the event vector adapter. numbers, numbers, numbers β we're obsessed. π₯
Parameters
adapterβ pointer to the event vector adapter.statsβ pointer to the structure where the statistics will be stored.
Returns 0 on success, negative value on failure.
π§ rte_event_vector_adapter_stats_reset π§
__rte_experimental int rte_event_vector_adapter_stats_reset (struct
rte_event_vector_adapter * adapter)
Reset the event vector adapter statistics.
resets the event vector adapter's statistics right back to their default values. clean slate energy, periodt. π
Parameters
adapterβ pointer to the event vector adapter whose statistics are to be reset.
Returns 0 on success, negative value on failure.
π rte_event_vector_adapter_service_id_get π
__rte_experimental int rte_event_vector_adapter_service_id_get (struct
rte_event_vector_adapter * adapter, uint32_t * service_id)
Retrieve the service ID of the event vector adapter. If the adapter doesn't use an rte_service function, this function returns -ESRCH.
Parameters
adapterβ a pointer to an event vector adapter.service_idβ a pointer to auint32_t, to be filled in with the service id.
Returns
0: success π<0: error code on failure-ESRCH: the adapter does not require a service to operate
π rte_event_vector_adapter_enqueue π
__rte_experimental int rte_event_vector_adapter_enqueue (struct
rte_event_vector_adapter * adapter, uint64_t objs[], uint16_t num_elem,
uint64_t flags) [inline], [static]
Enqueue objs into the event vector adapter.
this is the main character function fr fr. it enqueues a specified number of objs into the event vector adapter, and those objs get combined into a single vector event β an rte_event_vector β which then gets enqueued to the event queue configured in the adapter. ate. β¨
ngl bestie it's marked[inline]and[static], so keep that in mind.
Parameters
adapterβ pointer to the event vector adapter.objsβ array of objs to be enqueued.num_elemβ number of objs to be enqueued.flagsβ flags to be used for the enqueue operation.
Returns number of objs enqueued on success.
Definition at line 455 of file rte_event_vector_adapter.h. π
π« AUTHOR π«
Generated automatically by Doxygen for DPDK from the source code. (not me writing it by hand, the robot did it, and honestly? slay.)
aaaaand that's the whole page bestie!! π₯Ήπ this is DPDK, Version 25.11.3, and the manpage is rte_event_..._adapter.h(3). go forth and vector your events, you absolute legend. π¦β¨π
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms