DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kamraan Nasim <knasim@sidebandnetworks.com>
To: Matthew Hall <mhall@mhcomputing.net>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] IPC/message passing between DPDK application and non-DPDK userspace application
Date: Mon, 20 Oct 2014 10:41:05 -0400	[thread overview]
Message-ID: <CAPrTskhkuCwn9vxdRtyQ372Dgz5jP=umb6SZiBF3MqBkZnTOHg@mail.gmail.com> (raw)
In-Reply-To: <20141018173832.GD16406@mhcomputing.net>

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

      reply	other threads:[~2014-10-20 14:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-18  2:14 Kamraan Nasim
2014-10-18 17:38 ` Matthew Hall
2014-10-20 14:41   ` Kamraan Nasim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPrTskhkuCwn9vxdRtyQ372Dgz5jP=umb6SZiBF3MqBkZnTOHg@mail.gmail.com' \
    --to=knasim@sidebandnetworks.com \
    --cc=dev@dpdk.org \
    --cc=mhall@mhcomputing.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).