[dpdk-users] Service cores and multi-process

Van Haaren, Harry harry.van.haaren at intel.com
Thu Jan 17 14:33:46 CET 2019

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


[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 at intel.com>; users at dpdk.org
> Subject: RE: Service cores and multi-process
> Hi Pravin,
> > -----Original Message-----
> > From: users [mailto:users-bounces at dpdk.org] On Behalf Of Pathak,
> > Pravin
> > Sent: Thursday, January 17, 2019 3:02 AM
> > To: users at 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

More information about the users mailing list