From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1DD5DCF9 for ; Wed, 15 Jul 2015 11:14:57 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 15 Jul 2015 02:14:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,479,1432623600"; d="scan'208";a="729235130" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.113]) by orsmga001.jf.intel.com with SMTP; 15 Jul 2015 02:14:43 -0700 Received: by (sSMTP sendmail emulation); Wed, 15 Jul 2015 10:14:42 +0025 Date: Wed, 15 Jul 2015 10:14:42 +0100 From: Bruce Richardson To: "Polevoy, Igor" Message-ID: <20150715091441.GA860@bricha3-MOBL3> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] driver initialization in DPDK 2.0 built into a shared library. 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: Wed, 15 Jul 2015 09:14:58 -0000 On Tue, Jul 14, 2015 at 06:21:33PM +0000, Polevoy, Igor wrote: > Hi, > We are developing an application that uses DPDK PMD functionality . > We are using a linux shared library which contains the network packets processing code and it is statically linked with all the necessary DPDK libs. > The .so is loaded by the main program. > For the DPDK compilation we have added the -fPIC to the GCC options. > > While it all worked fine with DPDK 1.6 where we had the rte_pmd_init_all method, in the 2.0 version the > drivers registration methods (PMD_REGISTER_DRIVER) are not called when the shared library is loaded. > > Although, I can go along the lines of the rte_pmd_init all and manually call the driver registration, I'm concerned > that DPDK has other drivers initialization calls, and I don't actually know which are needed or could be needed and when. > > Do you have any advice on that? What is the best way to resolve this issue? > > Thank you > Igor. > You probably need to add the "no-as-needed" flag to your link command. /Bruce