* [dpdk-dev] IPC/message passing between DPDK application and non-DPDK userspace application
@ 2014-10-18 2:14 Kamraan Nasim
2014-10-18 17:38 ` Matthew Hall
0 siblings, 1 reply; 3+ messages in thread
From: Kamraan Nasim @ 2014-10-18 2:14 UTC (permalink / raw)
To: dev
Greetings,
I am still a DPDK newbie so not really sure how to go about doing this...
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.
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?
Please let me know if others have come across this. Any help from the DPDK
community would be greatly appreciated :)
--Kam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] IPC/message passing between DPDK application and non-DPDK userspace application
2014-10-18 2:14 [dpdk-dev] IPC/message passing between DPDK application and non-DPDK userspace application Kamraan Nasim
@ 2014-10-18 17:38 ` Matthew Hall
2014-10-20 14:41 ` Kamraan Nasim
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Hall @ 2014-10-18 17:38 UTC (permalink / raw)
To: Kamraan Nasim; +Cc: dev
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] IPC/message passing between DPDK application and non-DPDK userspace application
2014-10-18 17:38 ` Matthew Hall
@ 2014-10-20 14:41 ` Kamraan Nasim
0 siblings, 0 replies; 3+ messages in thread
From: Kamraan Nasim @ 2014-10-20 14:41 UTC (permalink / raw)
To: Matthew Hall; +Cc: dev
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@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.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-20 14:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-18 2:14 [dpdk-dev] IPC/message passing between DPDK application and non-DPDK userspace application Kamraan Nasim
2014-10-18 17:38 ` Matthew Hall
2014-10-20 14:41 ` Kamraan Nasim
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).