[dpdk-dev] [RFC] eventdev: introduce event dispatcher

Mattias Rönnblom mattias.ronnblom at ericsson.com
Fri Feb 26 08:48:28 CET 2021


On 2021-02-22 16:28, Luca Boccassi wrote:
> On Thu, 2021-02-18 at 19:30 +0100, Mattias Rönnblom wrote:
>> The purpose of the event dispatcher is primarily to decouple different
>> parts of an application (e.g., processing pipeline stages), which
>> share the same underlying event device.
>>
>> The event dispatcher replaces the conditional logic (often, a switch
>> statement) that typically follows an event device dequeue operation,
>> where events are dispatched to different parts of the application
>> based on the destination queue id.
>>
>> The concept is similar to a UNIX file descriptor event loop library.
>> Instead of tying callback functions to fds as for example libevent
>> does, the event dispatcher binds callbacks to queue ids.
>>
>> An event dispatcher is configured to dequeue events from a specific
>> event device, and ties into the service core framework, to do its (and
>> the application's) work.
>>
>> The event dispatcher provides a convenient way for an eventdev-based
>> application to use service cores for application-level processing, and
>> thus for sharing those cores with other DPDK services.
>>
>> Signed-off-by: Mattias Rönnblom <mattias.ronnblom at ericsson.com>
>> ---
>>   lib/librte_eventdev/Makefile                 |   2 +
>>   lib/librte_eventdev/meson.build              |   6 +-
>>   lib/librte_eventdev/rte_event_dispatcher.c   | 420 +++++++++++++++++++
>>   lib/librte_eventdev/rte_event_dispatcher.h   | 251 +++++++++++
>>   lib/librte_eventdev/rte_eventdev_version.map |  10 +
>>   5 files changed, 687 insertions(+), 2 deletions(-)
>>   create mode 100644 lib/librte_eventdev/rte_event_dispatcher.c
>>   create mode 100644 lib/librte_eventdev/rte_event_dispatcher.h
> Hi,
>
> Is this intended to be used by applications or by PMDs? If the former,
> then IMHO the interface should really be based around (or allow using)
> FDs, so that it can be polled. Applications normally have more event
> sources that just DPDK.
>
It's for applications. File descriptors might be involved in the API 
somehow, but I think for most applications, they are too costly. I mean, 
the whole point of DPDK is to avoid the operating system overhead.




More information about the dev mailing list