mbox series

[v4,0/4] improve examples installation

Message ID 20201112094142.1781861-1-bruce.richardson@intel.com (mailing list archive)
Headers
Series improve examples installation |

Message

Bruce Richardson Nov. 12, 2020, 9:41 a.m. UTC
  This patch improves the installation of the examples when "ninja install" is
run. It removes issues with the directory structure being flattened out, and
removes from the install list any examples that are not buildable with built
DPDK code.

V4: resubmit v3 to retest in CI hopefully with proper patch tracking

V3: fix issues with building on Windows

V2: add support for filtering examples that won't build

Bruce Richardson (4):
  examples: fix flattening directory layout on install
  examples/l2fwd-keepalive: skip build when no librt
  examples: stop processing build file if build is impossible
  examples: skip installing unbuildable examples

 examples/distributor/meson.build              |  3 +
 examples/ethtool/meson.build                  |  4 ++
 examples/ioat/meson.build                     |  3 +
 examples/ip_pipeline/meson.build              |  4 ++
 examples/kni/meson.build                      |  4 ++
 examples/l2fwd-cat/meson.build                |  4 ++
 examples/l2fwd-keepalive/meson.build          |  8 ++-
 examples/meson.build                          | 61 ++++++++++---------
 examples/ntb/meson.build                      |  2 +
 .../l3fwd-thread/meson.build                  |  4 ++
 .../pthread_shim/meson.build                  |  4 ++
 examples/pipeline/meson.build                 |  4 ++
 examples/vdpa/meson.build                     |  2 +
 examples/vhost/meson.build                    |  2 +
 examples/vhost_blk/meson.build                |  2 +
 examples/vhost_crypto/meson.build             |  4 ++
 meson.build                                   |  5 ++
 17 files changed, 91 insertions(+), 29 deletions(-)

--
2.25.1
  

Comments

David Marchand Nov. 12, 2020, 11:14 a.m. UTC | #1
On Thu, Nov 12, 2020 at 10:42 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> This patch improves the installation of the examples when "ninja install" is
> run. It removes issues with the directory structure being flattened out, and
> removes from the install list any examples that are not buildable with built
> DPDK code.
>
> V4: resubmit v3 to retest in CI hopefully with proper patch tracking
>
> V3: fix issues with building on Windows
>
> V2: add support for filtering examples that won't build
>
> Bruce Richardson (4):
>   examples: fix flattening directory layout on install
>   examples/l2fwd-keepalive: skip build when no librt
>   examples: stop processing build file if build is impossible
>   examples: skip installing unbuildable examples

Thanks Bruce.
This series looks good to me.

My only comment is about vm_power_manager which won't build without
the internal librte_power header.
It builds fine with meson, because I guess meson pulls this library
directory into the include flags of the example, but it won't build
outside.

We can skip it in devtools/test-meson-builds.sh but, on the other
hand, I would exclude it from installing until it is fixed (in a
future release).
  
Bruce Richardson Nov. 12, 2020, 11:38 a.m. UTC | #2
On Thu, Nov 12, 2020 at 12:14:27PM +0100, David Marchand wrote:
> On Thu, Nov 12, 2020 at 10:42 AM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > This patch improves the installation of the examples when "ninja install" is
> > run. It removes issues with the directory structure being flattened out, and
> > removes from the install list any examples that are not buildable with built
> > DPDK code.
> >
> > V4: resubmit v3 to retest in CI hopefully with proper patch tracking
> >
> > V3: fix issues with building on Windows
> >
> > V2: add support for filtering examples that won't build
> >
> > Bruce Richardson (4):
> >   examples: fix flattening directory layout on install
> >   examples/l2fwd-keepalive: skip build when no librt
> >   examples: stop processing build file if build is impossible
> >   examples: skip installing unbuildable examples
> 
> Thanks Bruce.
> This series looks good to me.
> 
> My only comment is about vm_power_manager which won't build without
> the internal librte_power header.
> It builds fine with meson, because I guess meson pulls this library
> directory into the include flags of the example, but it won't build
> outside.
> 
> We can skip it in devtools/test-meson-builds.sh but, on the other
> hand, I would exclude it from installing until it is fixed (in a
> future release).
> 
Yes, good point.
Rather than adding special logic for it, I think we just add it in the
initialization of the exclusion array in patch 4, i.e.

-dpdk_examples_exclude = []$
+dpdk_examples_exclude = ['vm_power_manager']

Can this be done on apply, or do you want a v5 for it?

/Bruce
  
David Marchand Nov. 12, 2020, 1:48 p.m. UTC | #3
On Thu, Nov 12, 2020 at 12:38 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> > My only comment is about vm_power_manager which won't build without
> > the internal librte_power header.
> > It builds fine with meson, because I guess meson pulls this library
> > directory into the include flags of the example, but it won't build
> > outside.
> >
> > We can skip it in devtools/test-meson-builds.sh but, on the other
> > hand, I would exclude it from installing until it is fixed (in a
> > future release).
> >
> Yes, good point.
> Rather than adding special logic for it, I think we just add it in the
> initialization of the exclusion array in patch 4, i.e.
>
> -dpdk_examples_exclude = []$
> +dpdk_examples_exclude = ['vm_power_manager']
>
> Can this be done on apply, or do you want a v5 for it?

CI is happy with v4.

I tested this additional change, lgtm too.
I would add something in the commitlog to give some context:

"""
vm_power_manager relies on an internal header and can't build outside
the dpdk tree.
Hence, it is still built with meson but it is excluded from install
examples until it has been fixed.
"""

WDYT?
  
Bruce Richardson Nov. 12, 2020, 2:57 p.m. UTC | #4
On Thu, Nov 12, 2020 at 02:48:52PM +0100, David Marchand wrote:
> On Thu, Nov 12, 2020 at 12:38 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> > > My only comment is about vm_power_manager which won't build without
> > > the internal librte_power header.
> > > It builds fine with meson, because I guess meson pulls this library
> > > directory into the include flags of the example, but it won't build
> > > outside.
> > >
> > > We can skip it in devtools/test-meson-builds.sh but, on the other
> > > hand, I would exclude it from installing until it is fixed (in a
> > > future release).
> > >
> > Yes, good point.
> > Rather than adding special logic for it, I think we just add it in the
> > initialization of the exclusion array in patch 4, i.e.
> >
> > -dpdk_examples_exclude = []$
> > +dpdk_examples_exclude = ['vm_power_manager']
> >
> > Can this be done on apply, or do you want a v5 for it?
> 
> CI is happy with v4.
> 
> I tested this additional change, lgtm too.
> I would add something in the commitlog to give some context:
> 
> """
> vm_power_manager relies on an internal header and can't build outside
> the dpdk tree.
> Hence, it is still built with meson but it is excluded from install
> examples until it has been fixed.
> """
> 
> WDYT?
> 
LGTM
  
Thomas Monjalon Nov. 12, 2020, 6:36 p.m. UTC | #5
12/11/2020 10:41, Bruce Richardson:
> This patch improves the installation of the examples when "ninja install" is
> run. It removes issues with the directory structure being flattened out, and
> removes from the install list any examples that are not buildable with built
> DPDK code.
> 
> V4: resubmit v3 to retest in CI hopefully with proper patch tracking
> 
> V3: fix issues with building on Windows
> 
> V2: add support for filtering examples that won't build
> 
> Bruce Richardson (4):
>   examples: fix flattening directory layout on install
>   examples/l2fwd-keepalive: skip build when no librt
>   examples: stop processing build file if build is impossible
>   examples: skip installing unbuildable examples

Applied without last patch, thanks.

After offline discussions with Bruce and David,
the decision is to rework the patch 4 as part of another series
that David is preparing.
In short: we keep the option to install all examples
and add a new option to install only buildable examples.