From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 164E05398 for ; Thu, 28 Mar 2019 17:13:52 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2019 09:13:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,280,1549958400"; d="scan'208";a="156088408" Received: from lkrakowx-mobl.ger.corp.intel.com ([10.104.12.190]) by fmsmga002.fm.intel.com with ESMTP; 28 Mar 2019 09:13:51 -0700 From: Lukasz Krakowiak To: david.hunt@intel.com Cc: dev@dpdk.org, Lukasz Krakowiak Date: Thu, 28 Mar 2019 17:11:54 +0100 Message-Id: <20190328161154.20944-1-lukaszx.krakowiak@intel.com> X-Mailer: git-send-email 2.19.2.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] power: extend debugs on power instruction requests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 16:13:53 -0000 Extend debugs on power instruction and cmd police destroy requests. Signed-off-by: Lukasz Krakowiak --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C554AA0679 for ; Thu, 28 Mar 2019 17:13:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7AD6F1B39E; Thu, 28 Mar 2019 17:13:55 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 164E05398 for ; Thu, 28 Mar 2019 17:13:52 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2019 09:13:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,280,1549958400"; d="scan'208";a="156088408" Received: from lkrakowx-mobl.ger.corp.intel.com ([10.104.12.190]) by fmsmga002.fm.intel.com with ESMTP; 28 Mar 2019 09:13:51 -0700 From: Lukasz Krakowiak To: david.hunt@intel.com Cc: dev@dpdk.org, Lukasz Krakowiak Date: Thu, 28 Mar 2019 17:11:54 +0100 Message-Id: <20190328161154.20944-1-lukaszx.krakowiak@intel.com> X-Mailer: git-send-email 2.19.2.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] power: extend debugs on power instruction requests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190328161154.tyMWlUqa0Otr7-6PKVh7EhHgVYTdDyNVHz1p0DtnVFs@z> Extend debugs on power instruction and cmd police destroy requests. Signed-off-by: Lukasz Krakowiak --- 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