DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Service cores and multi-process
@ 2019-01-17  3:02 Pathak, Pravin
  2019-01-17 10:17 ` Van Haaren, Harry
  0 siblings, 1 reply; 5+ messages in thread
From: Pathak, Pravin @ 2019-01-17  3:02 UTC (permalink / raw)
  To: users

Hi All -

In case of DPDK multi-process mode, do we need to give same service core masks for all process invocation?

Regards
Pravin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-users] Service cores and multi-process
  2019-01-17  3:02 [dpdk-users] Service cores and multi-process Pathak, Pravin
@ 2019-01-17 10:17 ` Van Haaren, Harry
  2019-01-17 13:25   ` Pathak, Pravin
  0 siblings, 1 reply; 5+ messages in thread
From: Van Haaren, Harry @ 2019-01-17 10:17 UTC (permalink / raw)
  To: Pathak, Pravin, users

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-users] Service cores and multi-process
  2019-01-17 10:17 ` Van Haaren, Harry
@ 2019-01-17 13:25   ` Pathak, Pravin
  2019-01-17 13:33     ` Van Haaren, Harry
  0 siblings, 1 reply; 5+ messages in thread
From: Pathak, Pravin @ 2019-01-17 13:25 UTC (permalink / raw)
  To: Van Haaren, Harry, users

Hi Harry -
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?
I assumed primary process will start the service on service cores and secondary process (using same service core mask) will use the service.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-users] Service cores and multi-process
  2019-01-17 13:25   ` Pathak, Pravin
@ 2019-01-17 13:33     ` Van Haaren, Harry
  2019-01-17 13:41       ` Pathak, Pravin
  0 siblings, 1 reply; 5+ messages in thread
From: Van Haaren, Harry @ 2019-01-17 13:33 UTC (permalink / raw)
  To: Pathak, Pravin, users

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-users] Service cores and multi-process
  2019-01-17 13:33     ` Van Haaren, Harry
@ 2019-01-17 13:41       ` Pathak, Pravin
  0 siblings, 0 replies; 5+ messages in thread
From: Pathak, Pravin @ 2019-01-17 13:41 UTC (permalink / raw)
  To: Van Haaren, Harry, users

Thanks a lot Harry. It is clear to me now.
Pravin

-----Original Message-----
From: Van Haaren, Harry 
Sent: Thursday, January 17, 2019 8:34 AM
To: Pathak, Pravin <pravin.pathak@intel.com>; users@dpdk.org
Subject: RE: Service cores and multi-process

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-17 13:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17  3:02 [dpdk-users] Service cores and multi-process 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
2019-01-17 13:41       ` Pathak, Pravin

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