X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_power%2Fpower_kvm_vm.c;h=2bb17beb173c7e0ad080c252afb5cf5959ccf7d7;hb=cdfa0dc1702bcfe6c403d3cfe4046b29c8e6c5b9;hp=20659b72f9a645b574d36aa8470fd3c0458cce9c;hpb=185109906b809007a15db1d018100dc74ec37447;p=dpdk.git diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c index 20659b72f9..2bb17beb17 100644 --- a/lib/librte_power/power_kvm_vm.c +++ b/lib/librte_power/power_kvm_vm.c @@ -13,15 +13,15 @@ #define FD_PATH "/dev/virtio-ports/virtio.serial.port.poweragent" -static struct channel_packet pkt[CHANNEL_CMDS_MAX_VM_CHANNELS]; +static struct channel_packet pkt[RTE_MAX_LCORE]; int power_kvm_vm_init(unsigned int lcore_id) { - if (lcore_id >= CHANNEL_CMDS_MAX_VM_CHANNELS) { + if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Core(%u) is out of range 0...%d\n", - lcore_id, CHANNEL_CMDS_MAX_VM_CHANNELS-1); + lcore_id, RTE_MAX_LCORE-1); return -1; } pkt[lcore_id].command = CPU_POWER; @@ -37,9 +37,9 @@ power_kvm_vm_exit(unsigned int lcore_id) } uint32_t -power_kvm_vm_freqs(__attribute__((unused)) unsigned int lcore_id, - __attribute__((unused)) uint32_t *freqs, - __attribute__((unused)) uint32_t num) +power_kvm_vm_freqs(__rte_unused unsigned int lcore_id, + __rte_unused uint32_t *freqs, + __rte_unused uint32_t num) { RTE_LOG(ERR, POWER, "rte_power_freqs is not implemented " "for Virtual Machine Power Management\n"); @@ -47,7 +47,7 @@ power_kvm_vm_freqs(__attribute__((unused)) unsigned int lcore_id, } uint32_t -power_kvm_vm_get_freq(__attribute__((unused)) unsigned int lcore_id) +power_kvm_vm_get_freq(__rte_unused unsigned int lcore_id) { RTE_LOG(ERR, POWER, "rte_power_get_freq is not implemented " "for Virtual Machine Power Management\n"); @@ -55,8 +55,8 @@ power_kvm_vm_get_freq(__attribute__((unused)) unsigned int lcore_id) } int -power_kvm_vm_set_freq(__attribute__((unused)) unsigned int lcore_id, - __attribute__((unused)) uint32_t index) +power_kvm_vm_set_freq(__rte_unused unsigned int lcore_id, + __rte_unused uint32_t index) { RTE_LOG(ERR, POWER, "rte_power_set_freq is not implemented " "for Virtual Machine Power Management\n"); @@ -68,9 +68,9 @@ send_msg(unsigned int lcore_id, uint32_t scale_direction) { int ret; - if (lcore_id >= CHANNEL_CMDS_MAX_VM_CHANNELS) { + if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Core(%u) is out of range 0...%d\n", - lcore_id, CHANNEL_CMDS_MAX_VM_CHANNELS-1); + lcore_id, RTE_MAX_LCORE-1); return -1; } pkt[lcore_id].unit = scale_direction; @@ -107,7 +107,7 @@ power_kvm_vm_freq_min(unsigned int lcore_id) } int -power_kvm_vm_turbo_status(__attribute__((unused)) unsigned int lcore_id) +power_kvm_vm_turbo_status(__rte_unused unsigned int lcore_id) { RTE_LOG(ERR, POWER, "rte_power_turbo_status is not implemented for Virtual Machine Power Management\n"); return -ENOTSUP;