From: <pbhagavatula@marvell.com>
To: <jerinj@marvell.com>
Cc: <dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>
Subject: [RFC 0/2] introduce event vector adapter
Date: Wed, 26 Mar 2025 18:44:34 +0530 [thread overview]
Message-ID: <20250326131441.5965-1-pbhagavatula@marvell.com> (raw)
From: Pavan Nikhilesh <pbhagavatula@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 as a vector event and start aggregating a new
vector event with the enqueued ptr.
* When RTE_EVENT_VECTOR_ENQ_EOV is set, the vector adapter will add the
current ptr enqueued to the aggregated event and enqueue the vector event
to the event queue.
* If both flags are set, the vector adapter will flush the current aggregation
as a vector event and enqueue the current ptr as a single 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 current aggregation as a vector event if the minimum vector size is
reached, if not it will enqueue the objects as single events to the event
queue.
- 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 (2):
eventdev: introduce event vector adapter
eventdev: add default software vector adapter
config/rte_config.h | 1 +
lib/eventdev/event_vector_adapter_pmd.h | 87 +++
lib/eventdev/eventdev_pmd.h | 38 ++
lib/eventdev/meson.build | 3 +
lib/eventdev/rte_event_vector_adapter.c | 762 ++++++++++++++++++++++++
lib/eventdev/rte_event_vector_adapter.h | 469 +++++++++++++++
lib/eventdev/rte_eventdev.c | 23 +
lib/eventdev/rte_eventdev.h | 8 +
lib/eventdev/version.map | 13 +
9 files changed, 1404 insertions(+)
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
next reply other threads:[~2025-03-26 13:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 13:14 pbhagavatula [this message]
2025-03-26 13:14 ` [RFC 1/2] eventdev: " pbhagavatula
2025-03-26 13:14 ` [RFC 2/2] eventdev: add default software " pbhagavatula
2025-03-26 14:18 ` Stephen Hemminger
2025-03-26 17:25 ` [EXTERNAL] " Pavan Nikhilesh Bhagavatula
2025-03-26 20:25 ` Stephen Hemminger
2025-03-26 14:22 ` Stephen Hemminger
2025-03-26 17:06 ` [RFC 0/2] introduce event " Pavan Nikhilesh Bhagavatula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250326131441.5965-1-pbhagavatula@marvell.com \
--to=pbhagavatula@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).