Thread (1 message) 1 message, 1 author, 2013-11-22

Re: Query regarding multiple processes in DPDK

From: Prashant Upadhyaya <hidden>
Date: 2013-11-22 13:46:17

Possibly related (same subject, not in this thread)

Thanks Bruce, I think your suggested example of multi_process answers my questions.

Regards
-Prashant


-----Original Message-----
From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Prashant Upadhyaya
Sent: Friday, November 22, 2013 7:10 PM
To: Richardson, Bruce; dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [dpdk-dev] Query regarding multiple processes in DPDK

Hi Bruce,

Thanks.

Regarding your comment --
[BR] It will depend upon the application, but in most cases you probably want to have slightly different code paths for primary and secondary instances. For example, if a process is running as primary instance, it will probably call rte_mempool_create or rte_ring_create. A secondary instance which wants to use these should instead call rte_mempool_lookup and rte_ring_lookup instead.
For an example of how to write the one binary to be used as both primary and secondary process, I suggest looking at the symmetric_mp example application in the examples/multi_process/ directory.

I was really hoping that the --proc-type=auto, would make the DPDK libraries internally resolving all this stuff, is that not the case ? I have not started reading the code for all this yet.
I must launch the same executable twice in my usecase. Even if the executable code has to make different calls when it comes up as secondary, is there a way for the usercode to know that it has really come up as secondary when the --proc-type=auto is used ?

Regards
-Prashant

-----Original Message-----
From: Richardson, Bruce [mailto:bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org]
Sent: Friday, November 22, 2013 7:02 PM
To: Prashant Upadhyaya; dev-VfR2kkLFssw@public.gmane.org
Subject: RE: Query regarding multiple processes in DPDK

Hi Prashant
===
The EAL also supports an auto-detection mode (set by EAL
--proc-type=auto flag), whereby an Intel(r) DPDK process is started as
a secondary instance if a primary instance is already running.
===

So does this mean that if I have a DPDK exe foo.out, then when I run
the first instance of foo.out with -proc-type = auto, then foo.out
will run as a primary process and when I spawn the second instance of
foo.out (with first already running) again with -proc-type=auto, then
this second instance automatically becomes secondary ?
[BR] Yes, that is the idea.
Also is there any user code initialization change required or exactly
the same code will work for both the processes ?
[BR] It will depend upon the application, but in most cases you probably want to have slightly different code paths for primary and secondary instances. For example, if a process is running as primary instance, it will probably call rte_mempool_create or rte_ring_create. A secondary instance which wants to use these should instead call rte_mempool_lookup and rte_ring_lookup instead.
For an example of how to write the one binary to be used as both primary and secondary process, I suggest looking at the symmetric_mp example application in the examples/multi_process/ directory.

Regards,
/Bruce





===============================================================================
Please refer to http://www.aricent.com/legal/email_disclaimer.html
for important disclosures regarding this electronic communication.
===============================================================================




===============================================================================
Please refer to http://www.aricent.com/legal/email_disclaimer.html
for important disclosures regarding this electronic communication.
===============================================================================
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help