[dpdk-dev] Question on DPDK multi-process support

Richardson, Bruce bruce.richardson at intel.com
Mon Feb 17 17:44:55 CET 2014


> Hi,
> I have some doubts on the DPDK multi-process support:
> 
> 1) According to the Programmers Guide (pag. 109 - 20.3 Multi-process
> Limitations), one of the multi-process limitations is:
> 
> "All Intel(r) DPDK processes running as a single application and using shared
> memory must have distinct coremask arguments. It is not possible to have
> a primary and secondary instance, or two secondary instances, using any of
> the same logical cores. Attempting to do so can cause corruption of
> memory pool caches, among other issues."
> 
> Does it mean that I can run a number of DPDK processes at most equal to
> the number of my CPU logical cores? In the case I run 2 mono-lcore DPDK
> processes with the same coremask, what are the possible issues?
> 
The potential issues are caused by a dependence on the lcore_id internally by Intel DPDK data structures, especially mempools. If two processes use the same lcore they will have the same lcore_id value, and will try and access the same mempool cache which is not thread-safe. This will cause mempool corruption.
NOTE: this applies only to co-operating processes, i.e. those run as primary and secondary processes. There are no mempool issues with running completely independent Intel DPDK processes on the same cores, i.e. processes run using different "--file-prefix=" parameters, since those do not share any memory and data structures. 

> 
> 2) Can a secondary process use the rte_eth_rx_burst over a queue of a NIC
> port configured in the primary process?
> 
Yes. NIC ports and their data structures are shared between co-operating processes. Multiple processes doing RX on the same port is shown in the "examples/multi_process/symmetric_mp" example application.


More information about the dev mailing list