From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: Radu Nicolau <radu.nicolau@intel.com>,
david.hunt@intel.com, lei.a.yao@intel.com,
pablo.de.lara.guarch@intel.com
Subject: Re: [dpdk-dev] [PATCH v2] examples/l3fw-power: do not exit on power lib init failure
Date: Sun, 05 Aug 2018 22:26:19 +0200 [thread overview]
Message-ID: <7373371.viCXXaUFzM@xps> (raw)
In-Reply-To: <1532685206-25950-1-git-send-email-radu.nicolau@intel.com>
No review?
27/07/2018 11:53, Radu Nicolau:
> Do not exit the application if power library fails to initialize
> or high performance cores configuration cannot be used.
>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
> v2: updated init_power_library to return error code if any core init fails
>
>
> examples/l3fwd-power/main.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
> index d15cd52..e73b853 100644
> --- a/examples/l3fwd-power/main.c
> +++ b/examples/l3fwd-power/main.c
> @@ -1638,11 +1638,13 @@ init_power_library(void)
> for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
> if (rte_lcore_is_enabled(lcore_id)) {
> /* init power management library */
> - ret = rte_power_init(lcore_id);
> - if (ret)
> + int cpi_ret = rte_power_init(lcore_id);
> + if (cpi_ret) {
> RTE_LOG(ERR, POWER,
> "Library initialization failed on core %u\n",
> lcore_id);
> + ret = -1;
> + }
> }
> }
> return ret;
> @@ -1683,10 +1685,10 @@ main(int argc, char **argv)
> rte_exit(EXIT_FAILURE, "Invalid L3FWD parameters\n");
>
> if (init_power_library())
> - rte_exit(EXIT_FAILURE, "init_power_library failed\n");
> + RTE_LOG(ERR, POWER, "init_power_library failed\n");
>
> if (update_lcore_params() < 0)
> - rte_exit(EXIT_FAILURE, "update_lcore_params failed\n");
> + RTE_LOG(ERR, POWER, "update_lcore_params failed\n");
>
> if (check_lcore_params() < 0)
> rte_exit(EXIT_FAILURE, "check_lcore_params failed\n");
>
next prev parent reply other threads:[~2018-08-05 20:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 13:49 [dpdk-dev] [PATCH] " Radu Nicolau
2018-07-26 17:39 ` De Lara Guarch, Pablo
2018-07-27 9:56 ` Radu Nicolau
2018-07-27 9:53 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
2018-08-05 20:26 ` Thomas Monjalon [this message]
2018-08-07 13:16 ` Hunt, David
2018-08-07 13:24 ` [dpdk-dev] [PATCH v3] " Radu Nicolau
2018-08-07 15:45 ` Hunt, David
2018-08-07 16:50 ` Radu Nicolau
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=7373371.viCXXaUFzM@xps \
--to=thomas@monjalon.net \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=lei.a.yao@intel.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=radu.nicolau@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).