[dpdk-dev] [PATCH v6] eal: add function to check if primary proc alive
Van Haaren, Harry
harry.van.haaren at intel.com
Tue Mar 8 10:58:34 CET 2016
Hi David,
> From: David Marchand [mailto:david.marchand at 6wind.com]
> Subject: Re: [PATCH v6] eal: add function to check if primary proc alive
> When I look at this new api, I am under the impression that you are
> supposed to check for primary liveliness once dpdk init has finished
> (from your secondary process point of view), not before and not while
> it is initialising.
The issue is that if a secondary process is initialized, it holds a read
lock on /var/run/.rte_config and this prevents a primary from starting.
So we *must* detect a primary process being ready to attach to, *without*
having called rte_eal_init() in the secondary process.
> Why do you need to move this ?
Issues arise when a primary and secondary process both scan the PCI devices
at the same time. Moving rte_eal_mcfg_complete() solves this race-cond
because the secondary process will wait until the primary is finished.
> > + if (config_file_path)
> > + config_fd = open(config_file_path, O_RDONLY);
> > + else {
> > + char default_path[PATH_MAX+1];
> > + snprintf(default_path, PATH_MAX, RUNTIME_CONFIG_FMT,
> > + default_config_dir, "rte");
> > + config_fd = open(default_path, O_RDONLY);
>
> Can't you reuse eal_runtime_config_path() here ?
No, as rte_eal_init() has not been called, for the same reason as above.
As rte_eal_init() has not been called, the shared config that is read by
eal_runtime_config_path() has not been initialized.
-Harry
More information about the dev
mailing list