[dpdk-dev] Query regarding multiple processes in DPDK

Richardson, Bruce bruce.richardson at intel.com
Fri Nov 22 14:31:47 CET 2013


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



More information about the dev mailing list