[dpdk-dev] driver initialization in DPDK 2.0 built into a shared library.

Bruce Richardson bruce.richardson at intel.com
Wed Jul 15 11:14:42 CEST 2015


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


More information about the dev mailing list