power: common interface for guest and host
authorAlan Carew <alan.carew@intel.com>
Tue, 25 Nov 2014 16:18:08 +0000 (16:18 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 26 Nov 2014 16:27:04 +0000 (17:27 +0100)
commit445c6528b55f9025bbeeb5eeabaed14c74125696
tree3f04ab31f148d27b591f4717e290f158167bb53e
parentcd0d5547e873c06386231d6fdae381d5c4f9f9bd
power: common interface for guest and host

Moved the current librte_power implementation to rte_power_acpi_cpufreq, with
renaming of functions only.
Added rte_power_kvm_vm implementation to support Power Management from a VM.

librte_power now hides the implementation based on the environment used.
A new call rte_power_set_env() can explicidly set the environment, if not
called then auto-detection takes place.

rte_power_kvm_vm is subset of the librte_power APIs, the following is supported:
 rte_power_init(unsigned lcore_id)
 rte_power_exit(unsigned lcore_id)
 rte_power_freq_up(unsigned lcore_id)
 rte_power_freq_down(unsigned lcore_id)
 rte_power_freq_min(unsigned lcore_id)
 rte_power_freq_max(unsigned lcore_id)

The other unsupported APIs return -ENOTSUP

Signed-off-by: Alan Carew <alan.carew@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_power/rte_power.c
lib/librte_power/rte_power.h
lib/librte_power/rte_power_acpi_cpufreq.c [new file with mode: 0644]
lib/librte_power/rte_power_acpi_cpufreq.h [new file with mode: 0644]
lib/librte_power/rte_power_common.h [new file with mode: 0644]
lib/librte_power/rte_power_kvm_vm.c [new file with mode: 0644]
lib/librte_power/rte_power_kvm_vm.h [new file with mode: 0644]