Skip to content

Commit d7b713d

Browse files
LukaszKrakowiakInteltmonjalo
authored andcommitted
power: add some logs on requests
Extend debugs on power instruction and cmd police destroy requests. Signed-off-by: Lukasz Krakowiak <[email protected]>
1 parent 1b89799 commit d7b713d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

examples/vm_power_manager/channel_monitor.c

+12-3
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,8 @@ apply_policy(struct policy *pol)
630630
static int
631631
process_request(struct channel_packet *pkt, struct channel_info *chan_info)
632632
{
633+
int ret;
634+
633635
if (chan_info == NULL)
634636
return -1;
635637

@@ -645,6 +647,9 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)
645647
else
646648
core_num = pkt->resource_id;
647649

650+
RTE_LOG(DEBUG, CHANNEL_MONITOR, "Processing requested cmd for cpu:%d\n",
651+
core_num);
652+
648653
switch (pkt->unit) {
649654
case(CPU_POWER_SCALE_MIN):
650655
power_manager_scale_core_min(core_num);
@@ -677,9 +682,13 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)
677682
}
678683

679684
if (pkt->command == PKT_POLICY_REMOVE) {
680-
RTE_LOG(INFO, CHANNEL_MONITOR,
681-
"Removing policy %s\n", pkt->vm_name);
682-
remove_policy(pkt);
685+
ret = remove_policy(pkt);
686+
if (ret == 0)
687+
RTE_LOG(INFO, CHANNEL_MONITOR,
688+
"Removed policy %s\n", pkt->vm_name);
689+
else
690+
RTE_LOG(INFO, CHANNEL_MONITOR,
691+
"Policy %s does not exist\n", pkt->vm_name);
683692
}
684693

685694
/*

0 commit comments

Comments
 (0)