Hi all,
I am working on a platform that may have mandatory parameters for a
correct initialization (and also unique to each ODP instance). If I'm
reading it right the call to odp_init_global() may take NULL for
platform_params and then platform is supposed to "set all parameters to
their defaults". In an old mail chain (see [1]) on the list I've seen
that this "defaults" may mean another means of transport (i.e.
environment variables) for the platform parameters.
Is it allowed for a platform to fail odp_init_global() if it did not
receive a platform parameter required for its startup (i.e. some crucial
device that is distributed on per instance basis)? I guess this boils
down to whether "mandatory" platform parameters are allowed or not?
If yes, then aren't allowing applications to pass NULL in
odp_init_global() is only masking the problem as each ODP implementation
that has such mandatory parameters will need to provide an alternative
means of transport for the examples, tests and probably "platform
independent" applications to run and the only place where this is
specified is platform documentation?
I was wondering whether it may make sense to work on a platform
independent API for parsing such parameters from an argv+argc set or a
key=value list/array that would allow platform to go through parameters
from command line and report error if it is missing mandatory parameters
(and it did not get them through other transport means)?
If not then, given that default initialization turns out to be not
possible, when and how should I report to the user that he's missing
some parameters? During odp_init_global()?
[1] https://lists.linaro.org/pipermail/lng-odp/2015-November/017486.html
--
Best Regards,
Stanislaw Kardach