From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id ED60B6A87 for ; Mon, 9 Mar 2015 15:56:43 +0100 (CET) Received: by wivr20 with SMTP id r20so21349615wiv.5 for ; Mon, 09 Mar 2015 07:56:43 -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:in-reply-to :references; bh=c5rp7hXMqiXSC0A+vZ56TGMgGURfRFvZwio9wPInCa8=; b=LzvNID8uQ0UCH2LNeXaFa4unqak/sY8vVnxJE+WUghNtBaCHW8VQYaCfd32xYIs5qn KynhSumczfAP6PaGx1t34K8zu7Y665NhwCnq+bm6M97bu9u/BYtyDBs9y1CBuCO0OMO8 VEAC3MW6gXyx2GaUjWDTrlWNcgy+HAC8f5bLPEvbtvLp+lqHPk/ETqawRt+WtXPTuJup oR3OzmwIJYd9jz63QETT12CyvXBrX4mo0SLA14VeDjrA/TN4ER5GneuDjKe3QHGuW13Z IfMgXW/swXh7ha7za7nMSBXzVScAGJK+yG3WrQqLr/3ucKPPR8gx2AVm2rFrzdeyLrIG o8Ig== X-Gm-Message-State: ALoCoQlSdpqDbj98rejjmV0f7EC2Ob3ZDISPunGogZPu3J6uzj/g63LdbaaCwqGCPRkMs6uUJwr7 X-Received: by 10.194.216.34 with SMTP id on2mr60644587wjc.24.1425913003816; Mon, 09 Mar 2015 07:56:43 -0700 (PDT) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id vq9sm26984115wjc.6.2015.03.09.07.56.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Mar 2015 07:56:43 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 9 Mar 2015 15:56:38 +0100 Message-Id: <1425912999-13118-2-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1425912999-13118-1-git-send-email-david.marchand@6wind.com> References: <1425912999-13118-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH 1/2] eal/linux: move plugin load to very start of eal 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: Mon, 09 Mar 2015 14:56:44 -0000 Loading shared libraries should be done at the very start of eal init so that the code statically built in dpdk and the code loaded from shared objects is handled (almost) the same way wrt to call to rte_eal_init(). The only thing that must be done before is filling the solib_list which is done by eal_parse_args(). Signed-off-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 16f9e7c..c1c103d 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -725,6 +725,13 @@ rte_eal_init(int argc, char **argv) if (fctret < 0) exit(1); + TAILQ_FOREACH(solib, &solib_list, next) { + RTE_LOG(INFO, EAL, "open shared lib %s\n", solib->name); + solib->lib_handle = dlopen(solib->name, RTLD_NOW); + if (solib->lib_handle == NULL) + RTE_LOG(WARNING, EAL, "%s\n", dlerror()); + } + /* set log level as early as possible */ rte_set_log_level(internal_config.log_level); @@ -797,13 +804,6 @@ rte_eal_init(int argc, char **argv) rte_eal_mcfg_complete(); - TAILQ_FOREACH(solib, &solib_list, next) { - RTE_LOG(INFO, EAL, "open shared lib %s\n", solib->name); - solib->lib_handle = dlopen(solib->name, RTLD_NOW); - if (solib->lib_handle == NULL) - RTE_LOG(WARNING, EAL, "%s\n", dlerror()); - } - eal_thread_init_master(rte_config.master_lcore); ret = eal_thread_dump_affinity(cpuset, RTE_CPU_AFFINITY_STR_LEN); -- 1.7.10.4