[dpdk-users] using dpdk as a shared library
Stephen Hemminger
stephen at networkplumber.org
Sat Dec 19 20:27:15 CET 2020
On Fri, 18 Dec 2020 23:38:28 +0100
Justin Tallon <justin.tallon at softwareradiosystems.com> wrote:
> Hey guys,
>
> We are trying to use dpdk (dpdk-stable-18.08.1) as a shared library.
>
> We have recompiled as a shared library by setting
> *CONFIG_RTE_BUILD_SHARED_LIB=y*
>
> My program compiles file and I can see the relevant libraries when I use
> ldd on the binary.
>
> I direct my binary look in the correct place by using export
> LD_LIBRARY_PATH and the binary appears to find the libraries.
> However, when the function rte_eth_dev_count_avail returns it returns a 0
> and exits, when I run the same program with static libraries, it works
> correctly.
>
> Any help on this would be great!
>
> Regards,
> Justin
>
>
> ____
> Justin Tallon Ph.D.
>
> Software Radio Systems (SRS)
> http://www.softwareradiosystems.com
>
> +353-86-067-0753 | justin.tallon at softwareradiosystems.com
When used as a shared library DPDK does not automatically load any required poll
mode driver libraries. You have to pass -d flag to make it load what you want.
I consider this a bug (others do not), and think the DPDK should have a table
mapping PCI device id to the PMD shared library and automatically load the PMD
shared library (like the Linux kernel module autoloading works).
More information about the users
mailing list