[dpdk-users] Difficulty With rte_eal_init()

Matthew Hall mhall at mhcomputing.net
Fri Mar 18 22:56:02 CET 2016


On Fri, Mar 18, 2016 at 02:45:10PM -0700, Cliff Burdick wrote:
> Hi, I've been trying to create a standalone application linked against
> DPDK, and I'm having some issues getting the program to run properly. The
> main problem is that in my standalone app compared to the example code,
> rte_eal_init() from the example code seems to probe the PCI bus, whereas
> mine doesn't.
[SNIP]
> However, when I then tried compiling the dpdk part of my app into a library 
> and linking against it from my main program, the PCI scanning goes away and 
> no devices are found.

This hoses up every new app developer. Especially me, as I used DPDK before 
the PCI probe behavior was changed between versions and got totally lost when 
it broke. You need the following:

Build Configuration:

CONFIG_RTE_BUILD_COMBINE_LIBS=y

Linker Flags (LDFLAGS):

-Wl,--whole-archive -Wl,--start-group -ldpdk -Wl,--end-group -Wl,--no-whole-archive

Sincerely.
Matthew.


More information about the users mailing list