summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Krakowiak <lukaszx.krakowiak@intel.com>2019-04-09 11:54:01 +0200
committerThomas Monjalon <thomas@monjalon.net>2019-04-22 22:44:45 +0200
commit236e164b22c8205516f054b2a478aa63c736cb9c (patch)
tree94628caf9e4714e5409bef8d68352df054142c6f
parentb2854d5317e834afe22e71412befe95b63aded4b (diff)
examples/power: remove policy dependency to MAC list
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 <lukaszx.krakowiak@intel.com> Acked-by: David Hunt <david.hunt@intel.com> Tested-by: Yufeng Mo <yufengx.mo@intel.com>
-rw-r--r--examples/vm_power_manager/channel_monitor.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 74df0fe20e..ad1ddde07f 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;