DPDK usage discussions
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "Pathak, Pravin" <pravin.pathak@intel.com>,
	"users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] Service cores and multi-process
Date: Thu, 17 Jan 2019 13:33:46 +0000	[thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA6757C22CF@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <168A68C163D584429EF02A476D5274424DEA932B@FMSMSX108.amr.corp.intel.com>

> -----Original Message-----
> From: Pathak, Pravin
> Sent: Thursday, January 17, 2019 1:26 PM
> To: Van Haaren, Harry <harry.van.haaren@intel.com>; users@dpdk.org
> Subject: RE: Service cores and multi-process
> 
> Hi Harry -

Hey,

[Side-note] Please reply inline on mailing-lists, it makes it easier
to follow the conversation than "top posting".


> Thanks.  Extending the same question further,  if two processes (within same
> DPDK instance) need same service, then should they both specify same service
> core mask?

This depends on what you want to achieve. If both processes need their own
instance of the service, have each process individually register the service,
and both processes (primary & secondary) will require a service core to run them.

The alternative is to use the DPDK hugepage shared memory to run a service
in one process (so only that process requires the service-core), and allow both
processes to enqueue/dequeue to that core.

For simplicity, I would recommend keeping services "process local" where possible.


> I assumed primary process will start the service on service cores and
> secondary process (using same service core mask) will use the service.

No, this is not the case.

Keep in mind that a "service" is just really just a function pointer and void* userdata.
A "service core" is just a thread that calls the function pointer with its void* arg.

Because it's a function-pointer, it is inherently tied to a specific process,
sharing function-pointers across process boundaries is not possible (especially
with ASLR enabled).


> Thanks
> Pravin
> 
> 
> -----Original Message-----
> From: Van Haaren, Harry
> Sent: Thursday, January 17, 2019 5:17 AM
> To: Pathak, Pravin <pravin.pathak@intel.com>; users@dpdk.org
> Subject: RE: Service cores and multi-process
> 
> Hi Pravin,
> 
> > -----Original Message-----
> > From: users [mailto:users-bounces@dpdk.org] On Behalf Of Pathak,
> > Pravin
> > Sent: Thursday, January 17, 2019 3:02 AM
> > To: users@dpdk.org
> > Subject: [dpdk-users] Service cores and multi-process
> >
> > Hi All -
> >
> > In case of DPDK multi-process mode, do we need to give same service
> > core masks for all process invocation?
> 
> No it is not required to give the exact same service-core mask.
> This is the same for "normal" DPDK lcores - they can be different in the
> secondary than they are in the primary.
> 
> 
> > Regards
> > Pravin
> 
> Regards, -Harry

  reply	other threads:[~2019-01-17 13:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17  3:02 Pathak, Pravin
2019-01-17 10:17 ` Van Haaren, Harry
2019-01-17 13:25   ` Pathak, Pravin
2019-01-17 13:33     ` Van Haaren, Harry [this message]
2019-01-17 13:41       ` Pathak, Pravin

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=E923DB57A917B54B9182A2E928D00FA6757C22CF@IRSMSX102.ger.corp.intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=pravin.pathak@intel.com \
    --cc=users@dpdk.org \
    /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).