[PATCH v8 0/3] Add dispatcher library

David Marchand david.marchand at redhat.com
Thu Oct 12 14:48:06 CEST 2023


On Thu, Oct 12, 2023 at 10:55 AM Mattias Rönnblom
<mattias.ronnblom at ericsson.com> wrote:
>
> The purpose of the dispatcher library is to decouple different parts
> of an eventdev-based application (e.g., processing pipeline stages),
> sharing the same underlying event device.
>
> The 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 event meta data, such as the queue id or scheduling type.
>
> 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 dispatcher relies on application-supplied matching callback
> functions to decide where to deliver events.
>
> A 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 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.
>
> Although the dispatcher adds some overhead, experience suggests that
> the net effect on the application (both synthetic benchmarks and more
> real-world applications) may well be positive. This is primarily due
> to clustering (see programming guide) reducing cache misses.
>
> Benchmarking indicates that the overhead is ~10 cc/event (on a
> large core), with a handful of often-used handlers.
>
> The dispatcher does not support run-time reconfiguration.
>
> The use of the dispatcher library is optional, and an eventdev-based
> application may still opt to access the event device using direct
> eventdev API calls, or by some other means.
>
> Mattias Rönnblom (3):
>   lib: introduce dispatcher library
>   test: add dispatcher test suite
>   doc: add dispatcher programming guide
>
>  MAINTAINERS                              |    6 +
>  app/test/meson.build                     |    1 +
>  app/test/test_dispatcher.c               | 1056 ++++++++++++++++++++++
>  doc/api/doxy-api-index.md                |    1 +
>  doc/api/doxy-api.conf.in                 |    1 +
>  doc/guides/prog_guide/dispatcher_lib.rst |  433 +++++++++
>  doc/guides/prog_guide/index.rst          |    1 +
>  doc/guides/rel_notes/release_23_11.rst   |    5 +
>  lib/dispatcher/meson.build               |   13 +
>  lib/dispatcher/rte_dispatcher.c          |  694 ++++++++++++++
>  lib/dispatcher/rte_dispatcher.h          |  458 ++++++++++
>  lib/dispatcher/version.map               |   20 +
>  lib/meson.build                          |    2 +
>  13 files changed, 2691 insertions(+)
>  create mode 100644 app/test/test_dispatcher.c
>  create mode 100644 doc/guides/prog_guide/dispatcher_lib.rst
>  create mode 100644 lib/dispatcher/meson.build
>  create mode 100644 lib/dispatcher/rte_dispatcher.c
>  create mode 100644 lib/dispatcher/rte_dispatcher.h
>  create mode 100644 lib/dispatcher/version.map
>

Thanks for this latest revision, it lgtm.
I fixed a few grammar issues in the documentation and used simple ..
note:: blocks to be consistent with the rest of our docs.

Applied, thanks Mattias.


-- 
David Marchand



More information about the dev mailing list