From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Harman Kalra <hkalra@marvell.com>
Cc: dev@dpdk.org, David Hunt <david.hunt@intel.com>,
reshma.pattan@intel.com, jerinjacobk@gmail.com,
yinan.wang@intel.com
Subject: Re: [dpdk-dev] [EXT] [PATCH v2 7/7] l3fwd-power: add auto-selection of default mode
Date: Fri, 19 Jun 2020 10:56:11 +0100 [thread overview]
Message-ID: <d154e9c0-9cc2-495e-0642-66f91ec0668c@intel.com> (raw)
In-Reply-To: <20200619073710.GA96739@outlook.office365.com>
On 19-Jun-20 8:37 AM, Harman Kalra wrote:
> On Thu, Jun 18, 2020 at 06:18:29PM +0100, Anatoly Burakov wrote:
>> External Email
>>
>> ----------------------------------------------------------------------
>> Currently, the application does support running without the power
>> library being initialized, but it has to be specifically requested. On
>> platforms without support for frequency scaling using the power library,
>> we can just enable interrupt-only mode by default.
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>> Suggested-by: Jerin Jacob <jerinjacobk@gmail.com>
>> ---
>
> Application probed the platform for frequency scaling support, since
> octeontx2 doesnt support it, interrupt-only mode got enabled by default.
>
> Tested-by: Harman Kalra <hkalra@marvell.com>
Perhaps there should be a log indicating which one was picked. There's a
wrong comment in this particular patch as well, so i'll fix that while
i'm at it :)
Thanks!
>
>> examples/l3fwd-power/main.c | 16 +++++++++++++++-
>> 1 file changed, 15 insertions(+), 1 deletion(-)
>>
>> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
>> index 51acbfd87d..a66599e734 100644
>> --- a/examples/l3fwd-power/main.c
>> +++ b/examples/l3fwd-power/main.c
>> @@ -2412,6 +2412,20 @@ launch_timer(unsigned int lcore_id)
>> return 0;
>> }
>>
>> +static int
>> +autodetect_mode(void)
>> +{
>> + /*
>> + * Empty poll and telemetry modes have to be specifically requested to
>> + * be enabled, but we can auto-detect between legacy mode with or
>> + * without interrupts. Both ACPI and pstate can be used.
>> + */
>> + if (rte_power_check_env_supported(PM_ENV_ACPI_CPUFREQ))
>> + return APP_MODE_LEGACY;
>> + if (rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ))
>> + return APP_MODE_LEGACY;
>> + return APP_MODE_INTERRUPT;
>> +}
>>
>> int
>> main(int argc, char **argv)
>> @@ -2449,7 +2463,7 @@ main(int argc, char **argv)
>> rte_exit(EXIT_FAILURE, "Invalid L3FWD parameters\n");
>>
>> if (app_mode == APP_MODE_DEFAULT)
>> - app_mode = APP_MODE_LEGACY;
>> + app_mode = autodetect_mode();
>>
>> /* only legacy and empty poll mode rely on power library */
>> if ((app_mode == APP_MODE_LEGACY || app_mode == APP_MODE_EMPTY_POLL) &&
>> --
>> 2.17.1
--
Thanks,
Anatoly
prev parent reply other threads:[~2020-06-19 9:56 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 9:13 [dpdk-dev] [PATCH 0/3] Add interrupt-only mode to l3fwd-power Anatoly Burakov
2020-05-28 9:13 ` [dpdk-dev] [PATCH 1/3] l3fwd-power: disable interrupts by default Anatoly Burakov
2020-05-28 9:13 ` [dpdk-dev] [PATCH 2/3] l3fwd-power: only allow supported power library envs Anatoly Burakov
2020-05-28 9:13 ` [dpdk-dev] [PATCH 3/3] l3fwd-power: add interrupt-only mode Anatoly Burakov
2020-05-29 13:19 ` Harman Kalra
2020-05-29 14:19 ` Burakov, Anatoly
2020-05-30 10:02 ` [dpdk-dev] [EXT] " Harman Kalra
2020-06-01 12:50 ` Burakov, Anatoly
2020-06-02 10:23 ` Harman Kalra
2020-06-02 12:16 ` Harman Kalra
2020-06-15 11:31 ` Burakov, Anatoly
2020-06-15 11:43 ` Jerin Jacob
2020-06-15 15:05 ` Burakov, Anatoly
2020-06-15 15:21 ` Jerin Jacob
2020-06-15 15:45 ` Burakov, Anatoly
2020-06-15 16:29 ` Jerin Jacob
2020-06-16 9:31 ` Burakov, Anatoly
2020-06-16 17:09 ` Jerin Jacob
2020-06-08 1:24 ` [dpdk-dev] [PATCH 0/3] Add interrupt-only mode to l3fwd-power Wang, Yinan
2020-06-18 17:18 ` [dpdk-dev] [PATCH v2 0/7] " Anatoly Burakov
2020-06-19 10:53 ` [dpdk-dev] [PATCH v3 " Anatoly Burakov
2020-07-11 11:35 ` Thomas Monjalon
2020-06-19 10:53 ` [dpdk-dev] [PATCH v3 1/7] l3fwd-power: disable interrupts by default Anatoly Burakov
2020-06-19 10:53 ` [dpdk-dev] [PATCH v3 2/7] l3fwd-power: only allow supported power library envs Anatoly Burakov
2020-06-19 10:53 ` [dpdk-dev] [PATCH v3 3/7] l3fwd-power: code style and flow fixes Anatoly Burakov
2020-06-19 10:53 ` [dpdk-dev] [PATCH v3 4/7] l3fwd-power: add support for requesting legacy mode Anatoly Burakov
2020-06-19 10:53 ` [dpdk-dev] [PATCH v3 5/7] l3fwd-power: add interrupt-only mode Anatoly Burakov
2020-06-19 10:53 ` [dpdk-dev] [PATCH v3 6/7] power: add API to probe support for a specific env Anatoly Burakov
2020-06-19 10:53 ` [dpdk-dev] [PATCH v3 7/7] l3fwd-power: add auto-selection of default mode Anatoly Burakov
2020-07-11 10:07 ` Thomas Monjalon
2020-06-18 17:18 ` [dpdk-dev] [PATCH v2 1/7] l3fwd-power: disable interrupts by default Anatoly Burakov
2020-06-18 17:18 ` [dpdk-dev] [PATCH v2 2/7] l3fwd-power: only allow supported power library envs Anatoly Burakov
2020-06-18 17:18 ` [dpdk-dev] [PATCH v2 3/7] l3fwd-power: code style and flow fixes Anatoly Burakov
2020-06-18 17:18 ` [dpdk-dev] [PATCH v2 4/7] l3fwd-power: add support for requesting legacy mode Anatoly Burakov
2020-06-18 17:18 ` [dpdk-dev] [PATCH v2 5/7] l3fwd-power: add interrupt-only mode Anatoly Burakov
2020-06-18 17:18 ` [dpdk-dev] [PATCH v2 6/7] power: add API to probe support for a specific env Anatoly Burakov
2020-06-18 17:18 ` [dpdk-dev] [PATCH v2 7/7] l3fwd-power: add auto-selection of default mode Anatoly Burakov
2020-06-19 7:37 ` [dpdk-dev] [EXT] " Harman Kalra
2020-06-19 9:56 ` Burakov, Anatoly [this message]
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=d154e9c0-9cc2-495e-0642-66f91ec0668c@intel.com \
--to=anatoly.burakov@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=hkalra@marvell.com \
--cc=jerinjacobk@gmail.com \
--cc=reshma.pattan@intel.com \
--cc=yinan.wang@intel.com \
/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).