Porting application from libevent
Stephen Hemminger
stephen at networkplumber.org
Thu Feb 9 01:00:55 CET 2023
On Wed, 8 Feb 2023 14:46:19 -0500
Ken Cox <kenstir at gmail.com> wrote:
> I have several server applications based on libevent (
> https://github.com/libevent/libevent) that use high-resolution timers, UDP,
> and TCP sockets. Right now they run on SR-IOV instances and I would like
> to port these to DPDK to get access to bonded interfaces. Any advice?
>
> I read most of the DPDK Programmer's Guide, and looked at the Event Device
> Library, but it is quite low-level and will entail a substantial amount of
> rework.
> I looked at dpdk-ans (https://github.com/ansyun/dpdk-ans), which provides a
> socket API on top of DPDK, but it seems to be not recently maintained.
> I also looked at seastar (https://github.com/scylladb/seastar), which
> provides an event-driven framework on top of DPDK, but it would require a
> complete rewrite from libevent to futures and C++17.
>
> Any advice would be very much appreciated!
>
> --
> -Ken
I have some experience with libevent. It is really mostly a wrapper on
top of file descriptor (epoll) based API. You might be able to do something
with hardware that supports interrupts in DPDK and using rte_epoll().
This would let application wait for packet or other sources. Still would
need to process packets and may or may not get the data you want; then go
back to sleep only if idle. Kind of like the Linux NAPI model. There is
an example of using this in l3fwd-power example.
More information about the users
mailing list