From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) by dpdk.org (Postfix) with ESMTP id 41A69594C for ; Thu, 17 Apr 2014 23:58:06 +0200 (CEST) Received: by mail-we0-f180.google.com with SMTP id p61so961104wes.25 for ; Thu, 17 Apr 2014 14:58:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=FKtPab+Vj1Uwcl1Lo0WdOENL6nFcZPtS4XBDTUu5T9E=; b=iRptflQrdCaMF7lx4dTS4dC1WYR2yB6hjDNZNAa+kd/+uMjDncTBcrCbcxxopdHoXE yhjKvRVdKVKn6yVhDBBWV8GSrOEaASJXkwrYTXT67P5KMoeSHL1Dm5M8vdpAIRNeW0Ag DcmZBvXB7iNFpBgTtw4nFErqRqd3Q1CDXA2UUaLmRAkjPclrJz+1U7gnl/o6/OZ0Qa5x cO9Aqs5pkMy6ZQh1hnZzVooQrUiBgmnx6gNHdK2+rBbGZUxRwlCdqTGqcM/+oYMjr147 uxmCncyfq8F82YaVJUw7AozOplpu4MJPn5LnYHZIn2YxqmdkrvC083tbfs7UWMnqD2+O 9oTQ== X-Gm-Message-State: ALoCoQmtqxn7Re/LKvYEncuPXNWhQnL9pog1IDlEYV8wwetpMPSswYW4gV03+jcCB56H+gImBle+ X-Received: by 10.194.58.79 with SMTP id o15mr3478362wjq.62.1397771886730; Thu, 17 Apr 2014 14:58:06 -0700 (PDT) Received: from xps13.localnet (abo-213-55-68.mts.modulonet.fr. [85.68.55.213]) by mx.google.com with ESMTPSA id cv4sm40696537wjc.34.2014.04.17.14.58.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Apr 2014 14:58:05 -0700 (PDT) From: Thomas Monjalon To: Wang Sheng-Hui Date: Thu, 17 Apr 2014 23:58:04 +0200 Message-ID: <1535185.7KmB8bpc9i@xps13> Organization: 6WIND User-Agent: KMail/4.12.4 (Linux/3.14.1-1-ARCH; KDE/4.12.4; x86_64; ; ) In-Reply-To: <534CA193.2000604@gmail.com> References: <534CA193.2000604@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Thu, 17 Apr 2014 21:58:06 -0000 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