/* Copy the contents of *pkt into the policy.pkt */
policies[i].pkt = *pkt;
get_pcpu_to_control(&policies[i]);
- if (get_pfid(&policies[i]) == -1) {
+ if (get_pfid(&policies[i]) < 0) {
updated = 1;
break;
}
if (policies[i].enabled == 0) {
policies[i].pkt = *pkt;
get_pcpu_to_control(&policies[i]);
- if (get_pfid(&policies[i]) == -1)
+ if (get_pfid(&policies[i]) < 0)
break;
core_share_status(i);
policies[i].enabled = 1;
if (pkt->command == CPU_POWER) {
unsigned int core_num;
- core_num = get_pcpu(chan_info, pkt->resource_id);
+ if (pkt->core_type == CORE_TYPE_VIRTUAL)
+ core_num = get_pcpu(chan_info, pkt->resource_id);
+ else
+ core_num = pkt->resource_id;
switch (pkt->unit) {
case(CPU_POWER_SCALE_MIN):
buffer, buffer_len);
if (n_bytes == buffer_len)
break;
- if (n_bytes == -1) {
+ if (n_bytes < 0) {
err = errno;
RTE_LOG(DEBUG, CHANNEL_MONITOR,
"Received error on "