From: David Hunt <david.hunt@intel.com>
To: dev@dpdk.org
Cc: david.hunt@intel.com
Subject: [dpdk-dev] [PATCH v1] examples/power: add baseline mode to PMD power
Date: Mon, 31 May 2021 12:30:08 +0100 [thread overview]
Message-ID: <20210531113008.3087-1-david.hunt@intel.com> (raw)
The PMD Power Management scheme currently has 3 modes,
scale, monitor and pause. However, it would be nice to
have a baseline mode for easy comparison of power savings
with and without these modes.
This patch adds a 'baseline' mode were the pmd power
management is not enabled. Use --pmg-mgmt=baseline.
Signed-off-by: David Hunt <david.hunt@intel.com>
---
examples/l3fwd-power/main.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index f8dfed1634..34b0eaa401 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1617,7 +1617,7 @@ print_usage(const char *prgname)
" empty polls, full polls, and core busyness to telemetry\n"
" --interrupt-only: enable interrupt-only mode\n"
" --pmd-mgmt MODE: enable PMD power management mode. "
- "Currently supported modes: monitor, pause, scale\n",
+ "Currently supported modes: baseline, monitor, pause, scale\n",
prgname);
}
@@ -1714,6 +1714,7 @@ parse_pmd_mgmt_config(const char *name)
#define PMD_MGMT_MONITOR "monitor"
#define PMD_MGMT_PAUSE "pause"
#define PMD_MGMT_SCALE "scale"
+#define PMD_MGMT_BASELINE "baseline"
if (strncmp(PMD_MGMT_MONITOR, name, sizeof(PMD_MGMT_MONITOR)) == 0) {
pmgmt_type = RTE_POWER_MGMT_TYPE_MONITOR;
@@ -1729,6 +1730,10 @@ parse_pmd_mgmt_config(const char *name)
pmgmt_type = RTE_POWER_MGMT_TYPE_SCALE;
return 0;
}
+ if (strncmp(PMD_MGMT_BASELINE, name, sizeof(PMD_MGMT_BASELINE)) == 0) {
+ pmgmt_type = -1;
+ return 0;
+ }
/* unknown PMD power management mode */
return -1;
}
@@ -2767,7 +2772,8 @@ main(int argc, char **argv)
"Fail to add ptype cb\n");
}
- if (app_mode == APP_MODE_PMD_MGMT) {
+ if ((app_mode == APP_MODE_PMD_MGMT) &&
+ (pmgmt_type >= 0)) {
ret = rte_power_ethdev_pmgmt_queue_enable(
lcore_id, portid, queueid,
pmgmt_type);
--
2.17.1
next reply other threads:[~2021-05-31 11:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-31 11:30 David Hunt [this message]
2021-06-02 11:14 ` Burakov, Anatoly
2021-06-22 14:07 ` [dpdk-dev] [PATCH v2] " David Hunt
2021-06-23 10:14 ` Burakov, Anatoly
2021-06-23 12:09 ` David Hunt
2021-06-23 14:14 ` Burakov, Anatoly
2021-07-10 6:43 ` Thomas Monjalon
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=20210531113008.3087-1-david.hunt@intel.com \
--to=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).