[PATCH 0/3] introduce event vector adapter
pbhagavatula at marvell.com
pbhagavatula at marvell.com
Thu Apr 10 20:00:38 CEST 2025
From: Pavan Nikhilesh <pbhagavatula at marvell.com>
The event vector adapter supports offloading the creation of event vectors
by vectorizing objects (mbufs/ptrs/u64s).
An event vector adapter has the following working model:
ââââââââââââ
â Vector âââ
â adapter0 â â
ââââââââââââ â
ââââââââââââ â ââââââââââââ
â Vector âââ¼âââºâ Event â
â adapter1 â â â Queue0 â
ââââââââââââ â ââââââââââââ
ââââââââââââ â
â Vector âââ
â adapter2 â
ââââââââââââ
ââââââââââââ
â Vector âââ
â adapter0 â â ââââââââââââ
ââââââââââââ ââââºâ Event â
ââââââââââââ â â Queue1 â
â Vector âââ ââââââââââââ
â adapter1 â
ââââââââââââ
- 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.
- 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.
- Each vector adapter aggregates 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, the 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 the event_type and sub_event_type properly
identifying the contents of vector event on dequeue.
- If the vector adapter advertises the RTE_EVENT_VECTOR_ADAPTER_CAP_SOV_EOV
capability, application can use the RTE_EVENT_VECTOR_ENQ_[S|E]OV flags
to indicate the start and end of a vector event.
* When RTE_EVENT_VECTOR_ENQ_SOV is 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_EOV is set, the vector adapter will add the
objects enqueued to 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.
- 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 objects as single events with fallback
event properties mentioned in rte_event_vector_adapter_conf::ev_fallback.
- If the vector adapter is unable to aggregate the objects into a vector event,
it will enqueue the objects as single events to the event queue with the
event properties mentioned in rte_event_vector_adapter_conf::ev_fallback.
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.
The application can enqueue one or more objects 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.
Pavan Nikhilesh (3):
eventdev: introduce event vector adapter
eventdev: add default software vector adapter
app/eventdev: add vector adapter performance test
app/test-eventdev/evt_common.h | 9 +-
app/test-eventdev/evt_options.c | 14 +
app/test-eventdev/evt_options.h | 1 +
app/test-eventdev/test_perf_atq.c | 61 +-
app/test-eventdev/test_perf_common.c | 281 ++++--
app/test-eventdev/test_perf_common.h | 13 +-
app/test-eventdev/test_perf_queue.c | 66 +-
app/test/meson.build | 1 +
app/test/test_event_vector_adapter.c | 682 ++++++++++++++
config/rte_config.h | 1 +
doc/api/doxy-api-index.md | 1 +
doc/guides/eventdevs/features/default.ini | 7 +
.../eventdev/event_vector_adapter.rst | 208 +++++
doc/guides/prog_guide/eventdev/eventdev.rst | 10 +-
doc/guides/prog_guide/eventdev/index.rst | 1 +
doc/guides/rel_notes/release_25_07.rst | 11 +
doc/guides/tools/testeventdev.rst | 6 +
lib/eventdev/event_vector_adapter_pmd.h | 85 ++
lib/eventdev/eventdev_pmd.h | 38 +
lib/eventdev/meson.build | 3 +
lib/eventdev/rte_event_vector_adapter.c | 864 ++++++++++++++++++
lib/eventdev/rte_event_vector_adapter.h | 481 ++++++++++
lib/eventdev/rte_eventdev.c | 24 +
lib/eventdev/rte_eventdev.h | 10 +
24 files changed, 2779 insertions(+), 99 deletions(-)
create mode 100644 app/test/test_event_vector_adapter.c
create mode 100644 doc/guides/prog_guide/eventdev/event_vector_adapter.rst
create mode 100644 lib/eventdev/event_vector_adapter_pmd.h
create mode 100644 lib/eventdev/rte_event_vector_adapter.c
create mode 100644 lib/eventdev/rte_event_vector_adapter.h
--
2.43.0
More information about the dev
mailing list