DPDK usage discussions
 help / color / mirror / Atom feed
* Porting application from libevent
@ 2023-02-08 19:46 Ken Cox
  2023-02-09  0:00 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Cox @ 2023-02-08 19:46 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1288 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Porting application from libevent
  2023-02-08 19:46 Porting application from libevent Ken Cox
@ 2023-02-09  0:00 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2023-02-09  0:00 UTC (permalink / raw)
  To: Ken Cox; +Cc: users

On Wed, 8 Feb 2023 14:46:19 -0500
Ken Cox <kenstir@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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-09  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 19:46 Porting application from libevent Ken Cox
2023-02-09  0:00 ` Stephen Hemminger

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).