The purpose of the event dispatcher is to decouple different parts of an application (e.g., processing pipeline stages), sharing 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 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 event dispatcher relies on application-supplied matching callback functions to decide where to deliver events. 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. Although the event 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 event dispatcher does not support run-time reconfiguration. Mattias Rönnblom (3): eventdev: introduce event dispatcher test: add event dispatcher test suite doc: add event dispatcher programming guide app/test/meson.build | 1 + app/test/test_event_dispatcher.c | 1058 ++++++++++++++++++++ doc/api/doxy-api-index.md | 1 + doc/guides/prog_guide/event_dispatcher.rst | 443 ++++++++ doc/guides/prog_guide/index.rst | 1 + lib/eventdev/meson.build | 2 + lib/eventdev/rte_event_dispatcher.c | 793 +++++++++++++++ lib/eventdev/rte_event_dispatcher.h | 481 +++++++++ lib/eventdev/version.map | 14 + 9 files changed, 2794 insertions(+) create mode 100644 app/test/test_event_dispatcher.c create mode 100644 doc/guides/prog_guide/event_dispatcher.rst create mode 100644 lib/eventdev/rte_event_dispatcher.c create mode 100644 lib/eventdev/rte_event_dispatcher.h -- 2.34.1