From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id C8A061B5A2 for ; Sun, 5 Aug 2018 22:26:24 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 68DFD21161; Sun, 5 Aug 2018 16:26:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 05 Aug 2018 16:26:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=1lp4ZOFSDcpGw33x53huyOXe9h wFEJUzoJQyOaWqyTY=; b=bzB1rifgW3m9bN3oGuslhWy+c6OoN7MK9yrRpwMW8O KpYvn9oZPI3+bHOkDjPF1sAYbVD28rrYqADDPxM8EfJ+Hvz0JSIN7rTiFS7KOqKK gVDa/mhj/nl5JBYbxf9EGFlmmIipTaqcFTOkj8V4QxId1e6JkSAsRvWvDuyLelcZ M= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=1lp4ZO FSDcpGw33x53huyOXe9hwFEJUzoJQyOaWqyTY=; b=aJVoZZgwQPRd9HODrDcljZ laRPCjW/B/YgeC0onD6Y8w6d5snvJEugBCUcGPoMx5O1/qP4shvbRh9bGaaILV+g U5ZG6Us4HEaPUqKOLN92Go9FpDKM3Xl6/+XJmVfvsHUj94Y4dX2g623hb9+jDsN9 glW6bI6d5Ck3kPw16WLWt7OW/rop43sZElhBm5XmC6jIzr9Z1ToBuCEFbiv8ZYmn Ty7H0JV0Ow/VWjB8x84V5d9c2N/xKCTzKmtpbho8DoRydhKFvMpwkFxsJhqYtnME ymmHG/cgmSUtmFhRmcxlzejAZgZJoIFyzMU/tL6CTxJx59oHS5fHT6evO5xolyZg == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (197.15.136.77.rev.sfr.net [77.136.15.197]) by mail.messagingengine.com (Postfix) with ESMTPA id 6B46510269; Sun, 5 Aug 2018 16:26:22 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Radu Nicolau , david.hunt@intel.com, lei.a.yao@intel.com, pablo.de.lara.guarch@intel.com Date: Sun, 05 Aug 2018 22:26:19 +0200 Message-ID: <7373371.viCXXaUFzM@xps> In-Reply-To: <1532685206-25950-1-git-send-email-radu.nicolau@intel.com> References: <1531921784-10578-1-git-send-email-radu.nicolau@intel.com> <1532685206-25950-1-git-send-email-radu.nicolau@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] examples/l3fw-power: do not exit on power lib init failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2018 20:26:25 -0000 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 > --- > 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"); >