[dpdk-dev] [PATCH v4] eal: add function to check if primary proc alive

Tahhan, Maryam maryam.tahhan at intel.com
Wed Feb 24 14:50:37 CET 2016


> From: Van Haaren, Harry
> Sent: Tuesday, February 23, 2016 2:10 PM
> To: david.marchand at 6wind.com
> Cc: Tahhan, Maryam <maryam.tahhan at intel.com>; dev at dpdk.org; Van
> Haaren, Harry <harry.van.haaren at intel.com>
> Subject: [PATCH v4] eal: add function to check if primary proc alive
> 
> This patch adds a new function to the EAL API:
> int rte_eal_primary_proc_alive(const char *path);
> 
> The function indicates if a primary process is alive right now.
> This functionality is implemented by testing for a write- lock on the
> config file, and the function tests for a lock.
> 
> The use case for this functionality is that a secondary process can wait
> until a primary process starts by polling the function and waiting. When
> the primary is running, the secondary continues to poll to detect if the
> primary process has quit unexpectedly, the secondary process can detect
> this.
> 
> The RTE_MAGIC number is written to the shared config by the primary
> process, this is the signal to the secondary process that the EAL is set up,
> and ready to be used. The function
> rte_eal_mcfg_complete() writes RTE_MAGIC. This has been delayed in
> the EAL init proceedure, as the PCI probing in the primary process can
> interfere with the secondary running.
> 
> Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>

Acked-by: Maryam Tahhan <maryam.tahhan at intel.com>


More information about the dev mailing list