From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 4E527567F for ; Tue, 18 Apr 2017 16:22:25 +0200 (CEST) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 98C3726BA1; Tue, 18 Apr 2017 16:22:14 +0200 (CEST) From: Olivier Matz To: dev@dpdk.org Cc: ferruh.yigit@intel.com, jianfeng.tan@intel.com, thomas@monjalon.net Date: Tue, 18 Apr 2017 16:22:21 +0200 Message-Id: <20170418142225.6308-2-olivier.matz@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170418142225.6308-1-olivier.matz@6wind.com> References: <20170418142225.6308-1-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH 2/6] eal: move internal config initialization 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: Tue, 18 Apr 2017 14:22:25 -0000 It's better to initialize the internal config in rte_eal_init() instead of eal_log_level_parse(), since this structure is not only about logs. Signed-off-by: Olivier Matz --- lib/librte_eal/bsdapp/eal/eal.c | 3 ++- lib/librte_eal/linuxapp/eal/eal.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index db154db9a..ed16c2e58 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -323,7 +323,6 @@ eal_log_level_parse(int argc, char **argv) optind = 1; optreset = 1; - eal_reset_internal_config(&internal_config); rte_log_set_global_level(internal_config.log_level); while ((opt = getopt_long(argc, argvopt, eal_short_options, @@ -520,6 +519,8 @@ rte_eal_init(int argc, char **argv) thread_id = pthread_self(); + eal_reset_internal_config(&internal_config); + /* set log level as early as possible */ eal_log_level_parse(argc, argv); diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index b2758799c..fbfbb94ba 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -492,7 +492,6 @@ eal_log_level_parse(int argc, char **argv) argvopt = argv; optind = 1; - eal_reset_internal_config(&internal_config); rte_log_set_global_level(internal_config.log_level); while ((opt = getopt_long(argc, argvopt, eal_short_options, @@ -777,6 +776,8 @@ rte_eal_init(int argc, char **argv) thread_id = pthread_self(); + eal_reset_internal_config(&internal_config); + /* set log level as early as possible */ eal_log_level_parse(argc, argv); -- 2.11.0