From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wang Sheng-Hui Subject: Re: [PATCH] eal: parse args before any kinds of init Date: Fri, 18 Apr 2014 08:30:58 +0800 Message-ID: References: <534CA193.2000604@gmail.com> <1535185.7KmB8bpc9i@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: dev-VfR2kkLFssw@public.gmane.org To: Thomas Monjalon Return-path: In-Reply-To: <1535185.7KmB8bpc9i@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 >