[dpdk-users] DPDK 16.04 link changes cause PMD drivers to not be loaded
pmatilai at redhat.com
Thu Apr 21 10:56:57 CEST 2016
On 04/20/2016 05:26 PM, Aurojit Panda wrote:
> I am sorry that is a bit unintuitive considering:
> (a) This behavior differs between static and shared builds of DPDK.
> - In fact this behavior was identical in 2.2, and even in mainline
> before 948fd64befc3726 went in.
> (b) You already know the EAL_PMD_PATH at build time, and it makes it
> quite hard to ship scripts or anything to build DPDK, since now the
> configuration file becomes dependent on location.
The expectation is that shared libraries are installed to a shared,
known location. Otherwise there's not that much point in using shared
Note that you can also use the EAL option -d to load either single PMDs
or entire directories at runtime (regardless of EAL_PMD_PATH) so you
dont have to know the path at build time if that's what bothers you most.
> I wonder if you would consider changing this, as it stands just building
> DPDK after setting CONFIG_RTE_SHARED_LIB=y results in a testpmd that
> cannot run.
In shared library configuration, testpmd is not directly runnable
regardless of the drivers since its missing all the other libraries too:
[pmatilai at sopuli dpdk]$ build/app/testpmd
build/app/testpmd: error while loading shared libraries:
librte_distributor.so.1.1: cannot open shared object file: No such file
[pmatilai at sopuli dpdk]$
You'll need to get those libraries into linkers path anyway, either by
installing them to a common location or by extending LD_LIBRARY_PATH. In
either case, you need to know where the libraries are anyway.
All of which is not to say there might not be room for improvement, but
the linking behavior is not going to change. Again, PMDs are *plugins*
that are *meant* to be loaded at runtime. That allows for all sorts of
flexibility especially for packaging and shipping, at some extra cost in
For your own purposes, you can of course tweak the linking settings as
much as you like. Look for "plugins" in mk/rte.app.mk and change the
shared lib condition on the line above to "y" and there you have it. But
that's not the way plugins are meant to be used.
Oh and BTW, please don't top-post.
- Panu -
More information about the users