DPDK patches and discussions
 help / color / mirror / Atom feed
From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
To: david.hunt@intel.com
Cc: dev@dpdk.org, Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Subject: [dpdk-dev] [PATCH] power: extend debugs on power instruction requests
Date: Thu, 28 Mar 2019 17:11:54 +0100	[thread overview]
Message-ID: <20190328161154.20944-1-lukaszx.krakowiak@intel.com> (raw)
Message-ID: <20190328161154.tyMWlUqa0Otr7-6PKVh7EhHgVYTdDyNVHz1p0DtnVFs@z> (raw)

Extend debugs on power instruction and cmd police destroy
requests.

Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
---
 examples/vm_power_manager/channel_monitor.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 1a3a0fa76..32865da37 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -630,6 +630,8 @@ apply_policy(struct policy *pol)
 static int
 process_request(struct channel_packet *pkt, struct channel_info *chan_info)
 {
+	int ret;
+
 	if (chan_info == NULL)
 		return -1;
 
@@ -645,6 +647,9 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)
 		else
 			core_num = pkt->resource_id;
 
+		RTE_LOG(DEBUG, CHANNEL_MONITOR, "Processing requested cmd for cpu:%d\n",
+			core_num);
+
 		switch (pkt->unit) {
 		case(CPU_POWER_SCALE_MIN):
 			power_manager_scale_core_min(core_num);
@@ -677,9 +682,13 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)
 	}
 
 	if (pkt->command == PKT_POLICY_REMOVE) {
-		RTE_LOG(INFO, CHANNEL_MONITOR,
-				 "Removing policy %s\n", pkt->vm_name);
-		remove_policy(pkt);
+		ret = remove_policy(pkt);
+		if (ret == 0)
+			RTE_LOG(INFO, CHANNEL_MONITOR,
+				 "Removed policy %s\n", pkt->vm_name);
+		else
+			RTE_LOG(INFO, CHANNEL_MONITOR,
+				 "Policy %s does not exist\n", pkt->vm_name);
 	}
 
 	/*
-- 
2.19.2.windows.1


             reply	other threads:[~2019-03-28 16:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 16:11 Lukasz Krakowiak [this message]
2019-03-28 16:11 ` Lukasz Krakowiak
2019-03-29 22:35 ` Thomas Monjalon
2019-03-29 22:35   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190328161154.20944-1-lukaszx.krakowiak@intel.com \
    --to=lukaszx.krakowiak@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).