From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 218A54C94 for ; Wed, 12 Sep 2018 14:07:51 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2018 05:07:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,364,1531810800"; d="scan'208";a="69408745" Received: from dhunt5-mobl2.ger.corp.intel.com (HELO [10.237.221.37]) ([10.237.221.37]) by fmsmga007.fm.intel.com with ESMTP; 12 Sep 2018 05:07:49 -0700 To: "Yao, Lei A" , "dev@dpdk.org" Cc: "Mcnamara, John" References: <20180830105422.1198-1-david.hunt@intel.com> <20180830105422.1198-5-david.hunt@intel.com> <2DBBFF226F7CF64BAFCA79B681719D953A53C342@shsmsx102.ccr.corp.intel.com> From: "Hunt, David" Message-ID: Date: Wed, 12 Sep 2018 13:07:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <2DBBFF226F7CF64BAFCA79B681719D953A53C342@shsmsx102.ccr.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v1 4/7] examples/power: add host channel to power manager 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: Wed, 12 Sep 2018 12:07:52 -0000 Hi Lei, On 4/9/2018 8:31 AM, Yao, Lei A wrote: > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Hunt >> Sent: Thursday, August 30, 2018 6:54 PM >> To: dev@dpdk.org >> Cc: Mcnamara, John ; Hunt, David >> >> Subject: [dpdk-dev] [PATCH v1 4/7] examples/power: add host channel to >> power manager >> >> This patch adds a fifo channel to the vm_power_manager app through which >> we can send commands and polices. Intended for sending JSON strings. >> The fifo is at /tmp/powermonitor/fifo.0 >> >> Signed-off-by: David Hunt >> --- >> examples/vm_power_manager/channel_manager.c | 108 >> +++++++++++++++ >> examples/vm_power_manager/channel_manager.h | 17 ++- >> examples/vm_power_manager/channel_monitor.c | 146 >> +++++++++++++++----- >> examples/vm_power_manager/main.c | 2 + >> 4 files changed, 238 insertions(+), 35 deletions(-) >> >> diff --git a/examples/vm_power_manager/channel_manager.c >> b/examples/vm_power_manager/channel_manager.c >> index 2bb8641d3..bcd106be1 100644 >> --- a/examples/vm_power_manager/channel_manager.c >> +++ b/examples/vm_power_manager/channel_manager.c >> @@ -13,6 +13,7 @@ --snip-- >> >> @@ -160,8 +199,13 @@ update_policy(struct channel_packet *pkt) >> unsigned int updated = 0; >> int i; >> >> + >> + RTE_LOG(INFO, CHANNEL_MONITOR, >> + "Updating policy for %s\n", pkt->vm_name); >> + >> for (i = 0; i < MAX_VMS; i++) { >> if (strcmp(policies[i].pkt.vm_name, pkt->vm_name) == 0) { > I suggest add warning log here when no VM can match the policy name > which we send through the fifo.0. Otherwise, the user can't aware the > policy won't be applied. There's already a flag here called "updated" that if it falls through this loop without finding the policy name, it adds a new one, so no need for the message. I will however re-word the "Updating policy" message to read "Applying policy". "Applying" is less confusing. Thanks, Dave. ---snip---