From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0133D7F58 for ; Thu, 19 Apr 2018 16:39:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2018 07:39:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,469,1517904000"; d="scan'208";a="52039947" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.237.220.128]) ([10.237.220.128]) by orsmga002.jf.intel.com with ESMTP; 19 Apr 2018 07:39:37 -0700 To: Arnon Warshavsky , thomas@monjalon.net, wenzhuo.lu@intel.com, declan.doherty@intel.com, jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com, ferruh.yigit@intel.com Cc: dev@dpdk.org References: <1524117669-25729-1-git-send-email-arnon@qwilt.com> <1524117669-25729-11-git-send-email-arnon@qwilt.com> From: "Burakov, Anatoly" Message-ID: Date: Thu, 19 Apr 2018 15:39:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1524117669-25729-11-git-send-email-arnon@qwilt.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 10/11] eal: replace rte_panic instances in init sequence 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: Thu, 19 Apr 2018 14:39:41 -0000 On 19-Apr-18 7:01 AM, Arnon Warshavsky wrote: > Local functions to this file, > changing from void to int are non-abi-breaking. > For handling the single function that cannot > change from void to int due to abi, > where this is the only place it is called in, > I added a state variable that is being checked > right after the call to this function. A rewrite of commit message is in order, i think :) Something like this: Change some functions' return type from void to int. This will not break ABI because they are internal only. (see below for comments on lcore changes) > > -- > > v4 - fix split literal strings in log messages > > Signed-off-by: Arnon Warshavsky Again, please do not add patch/version notes to the commit message, put them after "---". Version history is not for commit messages, it's for people reviewing it before merge. > --- > lib/librte_eal/bsdapp/eal/eal.c | 86 ++++++++++++++------- > lib/librte_eal/bsdapp/eal/eal_thread.c | 65 +++++++++++----- > lib/librte_eal/common/eal_common_launch.c | 21 ++++++ > lib/librte_eal/common/include/rte_debug.h | 12 +++ > lib/librte_eal/linuxapp/eal/eal.c | 120 ++++++++++++++++++++---------- > lib/librte_eal/linuxapp/eal/eal_thread.c | 65 +++++++++++----- > 6 files changed, 270 insertions(+), 99 deletions(-) > > diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c > index d996190..9c2f6f1 100644 > --- a/lib/librte_eal/bsdapp/eal/eal.c > +++ b/lib/librte_eal/bsdapp/eal/eal.c > @@ -151,7 +151,7 @@ enum rte_iova_mode > * We also don't lock the whole file, so that in future we can use read-locks > * on other parts, e.g. memzones, to detect if there are running secondary > * processes. */ > -static void > +static int <...> > + > +/* move to panic state and do not return */ > +static __attribute__((noreturn)) void > +defunct_and_remain_in_endless_loop(void) > +{ > + rte_move_to_panic_state(); > + while (1) > + sleep(1); > } It seems like you're mixing two different patchsets here. Maybe it would be beneficial to put lcore changes in a separate patch? Technically, rte_panic's in lcore are not part of init sequence. (also, should panic state be volatile?) > > /* main loop of threads */ > @@ -106,8 +123,11 @@ void eal_thread_init_master(unsigned lcore_id) > if (thread_id == lcore_config[lcore_id].thread_id) > break; > } > - if (lcore_id == RTE_MAX_LCORE) > - rte_panic("cannot retrieve lcore id\n"); > + if (lcore_id == RTE_MAX_LCORE) { > + RTE_LOG(CRIT, EAL, "%s(): Cannot retrieve lcore id\n", -- Thanks, Anatoly