On 01/12/15 08:38, Savolainen, Petri (Nokia - FI/Espoo) wrote:

// Fill defaults (from config file)
// max_cpu = 64, max_mhz = 1000 (on this SoC)
plat_xyz_config_init_params(&plat_config);

Again, I strongly oppose this way. It doesn't make any sense. Any decent
applications should get the platform parameters through it's own config
from the user, and not try to hardcode these things.

How of those application parameters would need to be updated?
By the user, when configuring through the app's configuration interface. Not our concern how that happens.

Every time any of its target platforms change or add a parameter? Platforms may 
have many tuning parameters, which the application is *not interested* - 
default is fine, now and in the future.
Yes, e.g. DPDK has a lot of parameters, but it only mandates -n and -c (number of memory channels and cpu mask), and the latter is actually calculated by ODP-DPDK, so our apps need to specify -n only.


Now when application wants to change only one param trough plat_params, how it 
sets all other (100) parameters in the struct?

It really depends on platforms (that's why it's platform dependent), but struct is definitely not the best solution for that. Passing a string, or a linked list of struct, if you want something more elegant. That's really not our concern again, but generic application/API interfacing questions. I think you're concerns are mostly rooted on the thought that platform_params should be a struct. It's not.


-Petri



plat_config.max_cpu = 32;
plat_config.max_mhz = 500; // 500MHz was max on the old SoC, could be
overridden with some plat specific way
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to