From: Bruce Richardson <bruce.richardson@intel.com>
To: Robin Jarry <rjarry@redhat.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH dpdk v2 2/2] meson: add drivers to dynamic libraries
Date: Thu, 15 Oct 2026 12:52:49 +0100 [thread overview]
Message-ID: <atC-kJHTeupb1Qri@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20261015112607.3008792-6-rjarry@redhat.com>
On Thu, Oct 15, 2026 at 01:26:10PM +0200, Robin Jarry wrote:
> dpdk_shared_lib_deps only collects library dependencies, so DPDK built
> as a meson subproject with shared libraries never links against
> drivers that install public headers (e.g. bus/pci, bus/vdev). Add
> these drivers to dpdk_shared_lib_deps as well, mirroring what is
> already done for libraries in lib/meson.build.
>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>
> Notes:
> v2: added driver shared libs to the list for pkg-config
>
> drivers/meson.build | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 7146f036c4c9..0e8e69798bdf 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -405,6 +405,10 @@ foreach subpath:subdirs
> dependencies: static_deps)
>
> dpdk_static_drivers += static_lib
> + if headers.length() > 0
> + dpdk_libraries += shared_lib
> + dpdk_shared_lib_deps += shared_dep
> + endif
>
I think this changes significantly how out pkg-config files are working, vs
our original intention, so I think it actually needs more discussion.
As originally designed, when dynamically linking against DPDK the pkg-config
--libs libdpdk call was only meant to list out the libraries, with drivers
being dynamically loaded at runtime. Since drivers were never meant to have
a public API that was generally used, I believe the idea was that anyone
using driver-specific APIs was required themselves to pass the driver
explicitly to the linker. Otherwise everyone who does not use that driver
could end up (depending on their linker flags) with a dependency on that
unused driver. This change modifies that assumption and, while it makes it
easier for those using driver-specific APIs, it does change how things have
worked up till now.
On my system using a default build, this adds 33 drivers to the list of
libraries to link against when using pkg-config --libs.
/Bruce
next prev parent reply other threads:[~2026-10-15 11:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 10:09 [PATCH dpdk 0/2] Fix dynamic link of driver symbols with pkgconf Robin Jarry
2026-10-15 10:09 ` [PATCH dpdk 1/2] meson: rename static drivers list Robin Jarry
2026-10-15 10:36 ` Bruce Richardson
2026-10-15 10:09 ` [PATCH dpdk 2/2] meson: add drivers to dynamic libraries Robin Jarry
2026-10-15 10:40 ` Bruce Richardson
2026-10-15 10:41 ` [PATCH dpdk 0/2] Fix dynamic link of driver symbols with pkgconf Bruce Richardson
2026-10-15 11:27 ` Robin Jarry
2026-10-15 11:26 ` [PATCH dpdk v2 " Robin Jarry
2026-10-15 11:26 ` [PATCH dpdk v2 1/2] meson: rename static drivers list Robin Jarry
2026-10-15 11:26 ` [PATCH dpdk v2 2/2] meson: add drivers to dynamic libraries Robin Jarry
2026-10-15 11:52 ` Bruce Richardson [this message]
2026-10-15 12:06 ` Robin Jarry
2026-10-15 12:18 ` Bruce Richardson
2026-10-15 14:47 ` Robin Jarry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atC-kJHTeupb1Qri@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=rjarry@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox