[dpdk-dev] [RFC PATCH] replace DPDK config and build system

Bruce Richardson bruce.richardson at intel.com
Thu Jun 8 10:59:01 CEST 2017


On Wed, Jun 07, 2017 at 04:26:17PM -0700, Stephen Hemminger wrote:
> On Wed,  7 Jun 2017 11:47:42 +0100
> Bruce Richardson <bruce.richardson at intel.com> wrote:
> 
> > The prototype is incomplete, but it does build a reasonable number of our
> > libraries, some unit tests, the i40e PMD and the testpmd binary, and I have
> > successfully passed traffic using testpmd from the build. Some things are
> > not fully correct, e.g. static builds aren't working right now, as I haven't
> > correctly done all the dependency tracking, I think, and the cpu flag
> > detection has issues. It also has only been tried on x86_64 linux, on a
> > couple of systems, so YMMV. However, I feel it's a reasonable enough start
> > point to show what we might be able to achieve.
> 
> Remember that in many cases the build system and the target system are different.
> One of the problems with previous DPDK builds where build system was on bare metal
> but deployment target was on a more limited VM environment. I sweated through
> lots of  pain on that.

Yep, and I'm not going to claim that this is going to solve world hunger
here :-) or that switching is going to be easy. However, talking of
building and deploying on different targets, meson is designed to allow
cross-compilation, see for example the built-in objects for
"build_machine", "host_machine" and "target_machine":
http://mesonbuild.com/Reference-manual.html#build_machine-object

Also, one thing I did add into this prototype was some build argument
support to test how that would work. By default, when you run meson, it
will set up the cflags to pass in -march=native, much as is done by our
default targets now. However, this is easily changed when doing your own
builds, for example, to do two different builds in different directories:

$ meson native_build
...
Checking for value of define "__PCLMUL__": 1
Checking for value of define "__AVX__": 1
Checking for value of define "__AVX2__": 1
...

$ meson -Dmachine=ivybridge ivybridge_build
...
Checking for value of define "__PCLMUL__": 1
Checking for value of define "__AVX__": 1
Checking for value of define "__AVX2__":
...

This way you can easily set up different builds for different machine
targets, with different instruction set levels, as seen from where the
second case above did not report AVX2 support. The project-specific
options are given in meson_options.txt. See also relevant section in
meson docs: http://mesonbuild.com/Build-options.html

Regards,
/Bruce


More information about the dev mailing list