DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 0/4] add static ibverbs in meson
Date: Tue, 04 Feb 2020 16:14:46 +0100	[thread overview]
Message-ID: <12448434.uLZWGnKmhe@xps> (raw)
In-Reply-To: <20200204143314.GA679@bricha3-MOBL.ger.corp.intel.com>

04/02/2020 15:33, Bruce Richardson:
> On Tue, Feb 04, 2020 at 03:27:50PM +0100, Thomas Monjalon wrote:
> > 04/02/2020 12:48, Bruce Richardson:
> > > as we discussed offline, I really don't like the necessity of the
> > > hidden_deps part of this, so I've tried coming up with some other
> > > solutions.
> > 
> > Thanks for looking closely at these patches.
> > 
> > > For example, in my testing I get the same result with the
> > > following diff instead of the second two patches (just showing for mlx5 -
> > > changes for mlx4 are identical):
> > [...]
> > > -                       # Build without adding shared libs to Requires.private
> > > -                       hidden_deps += lib.partial_dependency(compile_args:true)
> > [...]
> > > +       ibv_cflags = run_command(find_program('pkg-config'), '--cflags', 'libibverbs').stdout()
> > [...]
> > > By doing things this way - assuming it works in your tests too - we avoid
> > > any need to change anything in the common drivers code.
> > 
> > Yes, you hide the dependency by getting cflags directly with pkg-config.
> > I wanted to avoid such solution because I was trying to use as much
> > as possible the meson infrastructure.
> > 
> > I think your solution relying on one more call to pkg-config is acceptable.
> > I will test it and will review whether we get all corner cases.
> > 
> 
> Thanks.
> It's not really ideal, but this is likely always going to be a bit flakey
> since we can't use distro-supplied .a files, and your scripting is needed
> to prevent even accidentally taking a non-custom-build rdma-core file.
> Furthermore, I see that while meson tracks PKG_CONFIG_PATH value itself for
> finding things, this does not get tracked between runs for shell calls.
> This can catch one out, for example:
> 
> PKG_CONFIG_PATH=/path/to/pc/files meson build
> 
> will work correctly for everything. However, if one does a reconfigure
> subsequently doing e.g. ninja reconfigure, meson will correctly pick up the
> .pc files, but the ibverbs-static script, or any run_command calls to
> pkg-config won't as it's not actually in the environment :-(

In my setup, I export PKG_CONFIG_PATH, so it is not an issue.
But I understand your point that we may hit the issue.
That's why I will work in meson upstream to avoid all of this in future.


> > In the meantime I discovered we are overlinking with meson
> > when using the dlopen linking option.
> > I will try to fix it as well with the same method.
> > 
> Right. Overlinking is probably less serious an issue though. Does it cause
> any real-world problems?

Overlinking defeats the benefit of dlopen.
The idea of dlopen is to avoid having ibverbs as mandatory DPDK dependency.
The ibverbs lib is loaded with dlopen only if probing a Mellanox device.
The dlopen solution makes the PMD really like an optional plugin,
same as for static linkage in the PMD.



  reply	other threads:[~2020-02-04 15:14 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16  7:16 [dpdk-dev] [PATCH 0/3] " Thomas Monjalon
2020-01-16  7:16 ` [dpdk-dev] [PATCH 1/3] buildtools: rework static pkg-config script Thomas Monjalon
2020-01-16  7:16 ` [dpdk-dev] [PATCH 2/3] build: allow to hide dependencies from pkg-config Thomas Monjalon
2020-01-17 17:34   ` Bruce Richardson
2020-01-16  7:16 ` [dpdk-dev] [PATCH 3/3] net/mlx: support static ibverbs linkage with meson Thomas Monjalon
2020-01-27 15:43 ` [dpdk-dev] [PATCH v2 0/4] add static ibverbs in meson Thomas Monjalon
2020-01-27 15:43   ` [dpdk-dev] [PATCH v2 1/4] net/mlx: add static ibverbs linkage with meson Thomas Monjalon
2020-01-27 15:44   ` [dpdk-dev] [PATCH v2 2/4] buildtools: get static mlx dependencies for meson Thomas Monjalon
2020-01-29 15:37     ` Bruce Richardson
2020-01-29 17:48       ` Thomas Monjalon
2020-01-29 17:50         ` Bruce Richardson
2020-01-29 18:49           ` Thomas Monjalon
2020-01-29 17:48       ` Bruce Richardson
2020-01-27 15:44   ` [dpdk-dev] [PATCH v2 3/4] build: allow hiding dependencies from pkg-config Thomas Monjalon
2020-01-27 15:44   ` [dpdk-dev] [PATCH v2 4/4] net/mlx: workaround static linkage with meson Thomas Monjalon
2020-02-04 11:48   ` [dpdk-dev] [PATCH v2 0/4] add static ibverbs in meson Bruce Richardson
2020-02-04 14:27     ` Thomas Monjalon
2020-02-04 14:33       ` Bruce Richardson
2020-02-04 15:14         ` Thomas Monjalon [this message]
2020-02-04 15:20           ` Bruce Richardson
2020-02-11  1:19   ` [dpdk-dev] [PATCH v3 0/5] mlx ibverbs linking " Thomas Monjalon
2020-02-11  1:19     ` [dpdk-dev] [PATCH v3 1/5] net/mlx: add static ibverbs linkage with meson Thomas Monjalon
2020-02-11  1:19     ` [dpdk-dev] [PATCH v3 2/5] buildtools: get static mlx dependencies for meson Thomas Monjalon
2020-02-11  1:19     ` [dpdk-dev] [PATCH v3 3/5] net/mlx: workaround static linkage with meson Thomas Monjalon
2020-02-11 11:29       ` Bruce Richardson
2020-02-11 11:36         ` Thomas Monjalon
2020-02-11 11:43           ` Bruce Richardson
2020-02-11  1:19     ` [dpdk-dev] [PATCH v3 4/5] net/mlx: rename meson variable for dlopen option Thomas Monjalon
2020-02-11  1:19     ` [dpdk-dev] [PATCH v3 5/5] net/mlx: fix overlinking with meson and glue dlopen Thomas Monjalon
2020-02-11 11:32       ` Bruce Richardson
2020-02-11 11:34         ` Thomas Monjalon
2020-02-11 11:33     ` [dpdk-dev] [PATCH v3 0/5] mlx ibverbs linking in meson Bruce Richardson
2020-02-12  1:59 ` [dpdk-dev] [PATCH v4 0/6] " Thomas Monjalon
2020-02-12  1:59   ` [dpdk-dev] [PATCH v4 1/6] drivers: cleanup meson build variable Thomas Monjalon
2020-02-12  9:26     ` Xu, Rosen
2020-02-12  9:32       ` Thomas Monjalon
2020-02-12 15:04         ` [dpdk-dev] [dpdklab] " Jeremy Plsek
2020-02-12 15:18           ` Jeremy Plsek
2020-02-12 16:30             ` Thomas Monjalon
2020-02-12 16:36               ` Jeremy Plsek
2020-02-12 16:42                 ` Thomas Monjalon
2020-02-12 16:46                   ` Jeremy Plsek
2020-02-12 17:38                     ` Thomas Monjalon
2020-02-12 18:03                       ` Jeremy Plsek
2020-02-12  1:59   ` [dpdk-dev] [PATCH v4 2/6] net/mlx: add static ibverbs linkage with meson Thomas Monjalon
2020-02-12  1:59   ` [dpdk-dev] [PATCH v4 3/6] buildtools: get static mlx dependencies for meson Thomas Monjalon
2020-02-12  1:59   ` [dpdk-dev] [PATCH v4 4/6] net/mlx: workaround static linkage with meson Thomas Monjalon
2020-02-12  1:59   ` [dpdk-dev] [PATCH v4 5/6] net/mlx: rename meson variable for dlopen option Thomas Monjalon
2020-02-12  1:59   ` [dpdk-dev] [PATCH v4 6/6] net/mlx: fix overlinking with meson and glue dlopen Thomas Monjalon
2020-02-12  2:08   ` [dpdk-dev] [PATCH v4 0/6] mlx ibverbs linking in meson Thomas Monjalon
2020-02-12 22:07 ` [dpdk-dev] [PATCH v5 " Thomas Monjalon
2020-02-12 22:07   ` [dpdk-dev] [PATCH v5 1/6] drivers: cleanup meson build variable Thomas Monjalon
2020-02-13  0:25     ` Xu, Rosen
2020-02-12 22:07   ` [dpdk-dev] [PATCH v5 2/6] net/mlx: add static ibverbs linkage with meson Thomas Monjalon
2020-02-12 22:07   ` [dpdk-dev] [PATCH v5 3/6] buildtools: get static mlx dependencies for meson Thomas Monjalon
2020-02-12 22:07   ` [dpdk-dev] [PATCH v5 4/6] net/mlx: workaround static linkage with meson Thomas Monjalon
2020-02-12 22:07   ` [dpdk-dev] [PATCH v5 5/6] net/mlx: rename meson variable for dlopen option Thomas Monjalon
2020-02-12 22:07   ` [dpdk-dev] [PATCH v5 6/6] net/mlx: fix overlinking with meson and glue dlopen Thomas Monjalon
2020-02-13 13:57   ` [dpdk-dev] [PATCH v5 0/6] mlx ibverbs linking in meson Raslan Darawsheh

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=12448434.uLZWGnKmhe@xps \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).