[dpdk-dev] Shared library build is unable to parse device

Bruce Richardson bruce.richardson at intel.com
Thu May 9 10:58:39 CEST 2019

On Wed, May 08, 2019 at 08:24:35AM +0000, Rik Huijzer wrote:
> Hi,
> Amazed by the reported processing speed of DPDK, I'm trying to use DPDK as a shared library. Running the rxtx_callbacks (and possibly other) example(s) it exits on `unable to parse device` when enabling CONFIG_RTE_BUILD_SHARED_LIB. If this behavior is as expected for some reason I'm curious for some pointers into a direction I can take to have a shared library which can be called from another application.
> The error can be reproduced as follows on Ubuntu 18.04.2.
> 1. Download DPDK 18.05 and 19.02 and use these to fill the folders dpdk-18.05, dpdk-18.05-shared, dpdk-19.02, and dpdk-19.02-shared. We refer to these folders as $RTE_SDK.
> 2. For all folders `make config T=x86_64-native-linuxapp-gcc` and `sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config`
> 3. For both shared folders enable CONFIG_RTE_BUILD_SHARED in build/config.
> 4. For both shared folders add $RTE/build/lib to /etc/ld.so.conf.d/dpdk.conf and update libraries by reboot or sudo ldconfig.
> 5. For all folders `cd $RTE_SDK/build/examples/rxtx_callbacks/build/app` and `sudo ./rxtx_callbacks --vdev=eth_pcap0,iface=lo --vdev=eth_pcap1,iface=eno1` where one might need to replace the iface depending on the system.
> When doing step 5 both shared DPDK instances will fail with the error `unable to parse device` while the other two start processing packages.
For shared library builds, the driver libraries are not explicitly linked
into the apps, so you need to either:
1. have the drivers put into the folder given by EAL_PMD_PATH during the
   build so that EAL finds and loads them automatically.
2. Use the -d flag at runtime to tell EAL to load a driver or a folder of
   drivers on init.


More information about the dev mailing list