From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: [PATCH 03/19] eal: dlopen the DSO built poll mode drivers before init Date: Thu, 10 Apr 2014 16:49:53 -0400 Message-ID: <1397163009-29950-3-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> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1397163009-29950-1-git-send-email-nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> 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" 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