From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id CAAA968C3 for ; Thu, 10 Apr 2014 22:49:00 +0200 (CEST) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1WYLvf-0004Nh-CQ; Thu, 10 Apr 2014 16:50:37 -0400 From: Neil Horman To: dev@dpdk.org Date: Thu, 10 Apr 2014 16:49:53 -0400 Message-Id: <1397163009-29950-3-git-send-email-nhorman@tuxdriver.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1397163009-29950-1-git-send-email-nhorman@tuxdriver.com> References: <1397162846-28912-1-git-send-email-nhorman@tuxdriver.com> <1397163009-29950-1-git-send-email-nhorman@tuxdriver.com> X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: [dpdk-dev] [PATCH 03/19] eal: dlopen the DSO built poll mode drivers before 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, 10 Apr 2014 20:49:01 -0000 We need to call dlopen on any DSO's referenced on the command line before calling their init routines. This provides the DSO's the opportunity to run the constructors created by the PMD_INIT_NONPCI macro prior to the init list being traversed. Signed-off-by: Neil Horman --- lib/librte_eal/linuxapp/eal/eal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 905ce37..a4ad0eb 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -1046,9 +1046,6 @@ rte_eal_init(int argc, char **argv) rte_eal_mcfg_complete(); - if (rte_eal_non_pci_ethdev_init() < 0) - rte_panic("Cannot init non-PCI eth_devs\n"); - TAILQ_FOREACH(solib, &solib_list, next) { solib->lib_handle = dlopen(solib->name, RTLD_NOW); if ((solib->lib_handle == NULL) && (solib->name[0] != '/')) { @@ -1061,6 +1058,9 @@ rte_eal_init(int argc, char **argv) RTE_LOG(WARNING, EAL, "%s\n", dlerror()); } + if (rte_eal_non_pci_ethdev_init() < 0) + rte_panic("Cannot init non-PCI eth_devs\n"); + RTE_LOG(DEBUG, EAL, "Master core %u is ready (tid=%x)\n", rte_config.master_lcore, (int)thread_id); -- 1.8.3.1