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: fix for policy dependency to MAC list
Date: Tue, 9 Apr 2019 11:54:01 +0200 [thread overview]
Message-ID: <20190409095401.16740-1-lukaszx.krakowiak@intel.com> (raw)
Message-ID: <20190409095401.4BCz8V2tnpRL6Wl6JDbC0GvOjc3fk7deDtJ93ui9B54@z> (raw)
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>
---
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
next reply other threads:[~2019-04-09 9:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 9:54 Lukasz Krakowiak [this message]
2019-04-09 9:54 ` Lukasz Krakowiak
2019-04-18 14:13 ` Hunt, David
2019-04-18 14:13 ` Hunt, David
2019-04-22 20:05 ` Thomas Monjalon
2019-04-22 20:05 ` Thomas Monjalon
2019-04-19 9:39 ` Hunt, David
2019-04-19 9:39 ` Hunt, David
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=20190409095401.16740-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).