[dpdk-dev] IPC/message passing between DPDK application and non-DPDK userspace application

Kamraan Nasim knasim at sidebandnetworks.com
Mon Oct 20 16:41:05 CEST 2014


Thank you Matthew.

On closer inspection, I see that DPDK is simply using pthreads and
pthread_get/set_affinity() to bind to particular cores(as specified in
coremask) so no real magic there as you said...

Looking at the load_balancer app for inspiration.

--Kam

On Sat, Oct 18, 2014 at 1:38 PM, Matthew Hall <mhall at mhcomputing.net> wrote:

> On Fri, Oct 17, 2014 at 10:14:50PM -0400, Kamraan Nasim wrote:
> > I have a DPI daemon running in userspace which uses libpcap for packet RX
> > that I would like to replace with DPDK ethernet PMD. However it is not
> > feasible to convert the entire application to run within the DPDK
> framework
> > which is why I would like to split packet RX to use DPDK and have my
> > applications higher order functions continue using Linux pthread.
>
> The DPDK's lcore threads are just Linux pthreads bound onto specific cores.
> They aren't doing any secret stuff there really.
>
> So you could configure the DPDK to do stuff on some cores, and do your own
> stuff on other cores using the DPDK's "coremask" setting to say which
> cores it
> should launch itself on.
>
> > Is it possible to exchange data between DPDK processes and regular
> > userspace processes via some shared mem or IPC mechanism? I am not sure
> if
> > the SW ring buffers that DPDK provides can be used in this context?
>
> You can put extra threads in DPDK processes... the DPDK timer does this for
> example. Or you can pass stuff around... they have some example apps which
> have a master app and slave apps as separate Linux processes which can
> exchange data using the rings.
>
> > Please let me know if others have come across this. Any help from the
> DPDK
> > community would be greatly appreciated :)
>
> Yes, check through the various sample apps and see if there's something you
> can borrow from them. Good luck!
>
> Matthew.
>


More information about the dev mailing list