From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by dpdk.org (Postfix) with ESMTP id 93D9C5919 for ; Fri, 18 Apr 2014 02:30:58 +0200 (CEST) Received: by mail-la0-f42.google.com with SMTP id ec20so934242lab.29 for ; Thu, 17 Apr 2014 17:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=l1/QXqwgjPzNhuxVtHItCfSOEhiovEMrsSivej2ri0E=; b=RTQ3sho5VqHdbOPyoc/qTmGQ9VLziAET7owRRzhgoCFL+ZHLf3YOsghB2FrQ+qCCWO SKayKSTi6ccWAqwmTuaQ27+j/fQo/G9BQe0+Ugol5QJGZF9q+9SIuJ4Oi8gEPQDzP+1e s0kAfqpIBABtdC72QzVM6WDAzAg+p+bnVvof/iPAJkC8Bkemy+e5usGT+4UoVcps1W/7 6UTvCSYerdF6qrzzTQrLhjkoHyX3LNnDNmtbRxvoQieQ3Tk5T1mvP0SVBtNdxkEA2cao ZphXuxtax2iIjtp3No01MlKfN6iPEh2wwG4rJFD58ly/fDA/WGYyBmI8xinabLmyt3W/ jfmw== MIME-Version: 1.0 X-Received: by 10.112.126.7 with SMTP id mu7mr8752086lbb.17.1397781058694; Thu, 17 Apr 2014 17:30:58 -0700 (PDT) Received: by 10.152.146.225 with HTTP; Thu, 17 Apr 2014 17:30:58 -0700 (PDT) In-Reply-To: <1535185.7KmB8bpc9i@xps13> References: <534CA193.2000604@gmail.com> <1535185.7KmB8bpc9i@xps13> Date: Fri, 18 Apr 2014 08:30:58 +0800 Message-ID: From: Wang Sheng-Hui To: Thomas Monjalon Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] eal: parse args before any kinds of init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 00:30:59 -0000 Thanks, Thomas. 2014-04-18 5:58 GMT+08:00 Thomas Monjalon : > Hi, > > 2014-04-15 11:03, Wang Sheng-Hui: > > Parse args first, to resolve any invalid args and give out the usage > string. > > E.g './helloworld --invalid', the '--invalid' will be checked before any > > init. After the options are checked, take any init actions. > > > > Signed-off-by: Wang Sheng-Hui > [...] > > + fctret = eal_parse_args(argc, argv); > > + if (fctret < 0) > > + exit(1); > > + > > if (rte_eal_log_early_init() < 0) > > rte_panic("Cannot init early logs\n"); > > > > if (rte_eal_cpu_init() < 0) > > rte_panic("Cannot detect lcores\n"); > > > > - fctret = eal_parse_args(argc, argv); > > - if (fctret < 0) > > - exit(1); > > - > > Thank you for trying to improve this part. > > I think you cannot move eal_parse_args before rte_eal_log_early_init > because > eal_parse_args uses RTE_LOG. > I cannot see why rte_eal_cpu_init is call before argument parsing but we > should double check it. > > -- > Thomas >