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 F0C335F32 for ; Tue, 9 Apr 2019 11:56:19 +0200 (CEST) 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; 09 Apr 2019 02:56:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,329,1549958400"; d="scan'208";a="159530779" Received: from lkrakowx-mobl.ger.corp.intel.com ([10.103.104.101]) by fmsmga002.fm.intel.com with ESMTP; 09 Apr 2019 02:56:09 -0700 From: Lukasz Krakowiak To: david.hunt@intel.com Cc: dev@dpdk.org, Lukasz Krakowiak Date: Tue, 9 Apr 2019 11:54:01 +0200 Message-Id: <20190409095401.16740-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: fix for policy dependency to MAC list 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: Tue, 09 Apr 2019 09:56:20 -0000 Removed dependency to mac_list from policies: * BRANCH_RATIO, * WORKLOAD, * TIME in function update_policy. Fixes: 1b897991473f ("power: update error handling") Signed-off-by: Lukasz Krakowiak --- examples/vm_power_manager/channel_monitor.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c index 74df0fe20..ad1ddde07 100644 --- a/examples/vm_power_manager/channel_monitor.c +++ b/examples/vm_power_manager/channel_monitor.c @@ -437,9 +437,12 @@ update_policy(struct channel_packet *pkt) /* Copy the contents of *pkt into the policy.pkt */ policies[i].pkt = *pkt; get_pcpu_to_control(&policies[i]); - if (get_pfid(&policies[i]) < 0) { - updated = 1; - break; + /* Check Eth dev only for Traffic policy */ + if (policies[i].pkt.policy_to_use == TRAFFIC) { + if (get_pfid(&policies[i]) < 0) { + updated = 1; + break; + } } core_share_status(i); policies[i].enabled = 1; @@ -451,8 +454,13 @@ update_policy(struct channel_packet *pkt) if (policies[i].enabled == 0) { policies[i].pkt = *pkt; get_pcpu_to_control(&policies[i]); - if (get_pfid(&policies[i]) < 0) - break; + /* Check Eth dev only for Traffic policy */ + if (policies[i].pkt.policy_to_use == TRAFFIC) { + if (get_pfid(&policies[i]) < 0) { + updated = 1; + break; + } + } core_share_status(i); policies[i].enabled = 1; break; -- 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 2802FA0096 for ; Tue, 9 Apr 2019 11:56:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 659125F32; Tue, 9 Apr 2019 11:56:21 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id F0C335F32 for ; Tue, 9 Apr 2019 11:56:19 +0200 (CEST) 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; 09 Apr 2019 02:56:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,329,1549958400"; d="scan'208";a="159530779" Received: from lkrakowx-mobl.ger.corp.intel.com ([10.103.104.101]) by fmsmga002.fm.intel.com with ESMTP; 09 Apr 2019 02:56:09 -0700 From: Lukasz Krakowiak To: david.hunt@intel.com Cc: dev@dpdk.org, Lukasz Krakowiak Date: Tue, 9 Apr 2019 11:54:01 +0200 Message-Id: <20190409095401.16740-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: fix for policy dependency to MAC list 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: <20190409095401.4BCz8V2tnpRL6Wl6JDbC0GvOjc3fk7deDtJ93ui9B54@z> Removed dependency to mac_list from policies: * BRANCH_RATIO, * WORKLOAD, * TIME in function update_policy. Fixes: 1b897991473f ("power: update error handling") Signed-off-by: Lukasz Krakowiak --- examples/vm_power_manager/channel_monitor.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c index 74df0fe20..ad1ddde07 100644 --- a/examples/vm_power_manager/channel_monitor.c +++ b/examples/vm_power_manager/channel_monitor.c @@ -437,9 +437,12 @@ update_policy(struct channel_packet *pkt) /* Copy the contents of *pkt into the policy.pkt */ policies[i].pkt = *pkt; get_pcpu_to_control(&policies[i]); - if (get_pfid(&policies[i]) < 0) { - updated = 1; - break; + /* Check Eth dev only for Traffic policy */ + if (policies[i].pkt.policy_to_use == TRAFFIC) { + if (get_pfid(&policies[i]) < 0) { + updated = 1; + break; + } } core_share_status(i); policies[i].enabled = 1; @@ -451,8 +454,13 @@ update_policy(struct channel_packet *pkt) if (policies[i].enabled == 0) { policies[i].pkt = *pkt; get_pcpu_to_control(&policies[i]); - if (get_pfid(&policies[i]) < 0) - break; + /* Check Eth dev only for Traffic policy */ + if (policies[i].pkt.policy_to_use == TRAFFIC) { + if (get_pfid(&policies[i]) < 0) { + updated = 1; + break; + } + } core_share_status(i); policies[i].enabled = 1; break; -- 2.19.2.windows.1