DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [RFC PATCH] replace DPDK config and build system
Date: Wed,  7 Jun 2017 11:47:42 +0100	[thread overview]
Message-ID: <20170607104743.275149-1-bruce.richardson@intel.com> (raw)

Hi all,

following on from the pressing need to add support in DPDK for detecting
and managing external dependencies, I undertook to see what options we had.
However, unrelated to this, over time, I have become increasingly
frustrated by the complexity of the DPDK configuration and build system. As
such, I feel that looking at some of the newer build tools that are out
there might give us the additional functionality we want, along with other
benefits. As such, I undertook a prototype using "meson"[1] for
configuration, which uses "ninja" as a backend for doing the actual build.

With these tools we get the following benefits (not a complete list):
* support for detecting dependencies on the system
* support for detecting compiler features, including functions, defines
* improved maintainability through a high-level language, which gives
  decent error messages including line numbers (!!)
* co-existence with the existing makefile system without making any changes
  to it
* faster builds using ninja - on my many-core system, the builds seem
  significantly faster than with our existing system. Especially in the
  nothing-has-changed case, builds with my prototype return instantly,
  compared to taking a few seconds to recursively check each directory with
  the current build system
* the ability to switch to using a standard "ninja" + "ninja install" setup
* the chance to rework our existing build-config files, and hopefully
  pretty much remove them.
* pkg-config support.
* we get to move away from our bespoke build system
* dependencies in each lib can be moved back to being tracked in the libs
  files themselves, not up a level


Of course, it's not a panacea, but having spent hours on the prototype thus
far, I find working with meson and ninja far more user-friendly than
working on our makefiles, and again the build speed is a really nice
improvment too.

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.

Please take the prototype and test it out. I think it's a better
alternative to trying to bolt on additional functionality to our existing
config and build system.

[1] http://mesonbuild.com/

Bruce Richardson (1):
  build for DPDK with meson and ninja

 .gitignore                                         |  2 +
 app/meson.build                                    |  1 +
 app/test-pmd/meson.build                           | 20 +++++++
 config/meson.build                                 |  5 ++
 config/rte_config.h                                | 20 +++++++
 drivers/mempool/meson.build                        |  2 +
 drivers/mempool/ring/meson.build                   |  9 +++
 drivers/mempool/stack/meson.build                  |  9 +++
 drivers/meson.build                                |  2 +
 drivers/net/i40e/meson.build                       | 61 +++++++++++++++++++
 drivers/net/meson.build                            |  1 +
 lib/librte_acl/meson.build                         | 44 ++++++++++++++
 lib/librte_cmdline/meson.build                     | 30 ++++++++++
 lib/librte_compat/meson.build                      |  4 ++
 lib/librte_eal/common/arch/x86/meson.build         |  1 +
 lib/librte_eal/common/arch/x86_64                  |  1 +
 lib/librte_eal/common/eal_common_cpuflags.c        |  1 +
 lib/librte_eal/common/include/arch/x86/meson.build | 16 +++++
 lib/librte_eal/common/include/arch/x86_64          |  1 +
 lib/librte_eal/common/include/meson.build          | 36 +++++++++++
 lib/librte_eal/common/include/rte_common.h         |  1 +
 lib/librte_eal/common/include/rte_eal.h            |  2 +-
 lib/librte_eal/linuxapp/eal/eal.c                  |  6 +-
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c          |  9 +--
 lib/librte_eal/linuxapp/eal/meson.build            | 57 ++++++++++++++++++
 lib/librte_eal/linuxapp/meson.build                |  1 +
 lib/librte_eal/meson.build                         | 10 ++++
 lib/librte_ether/meson.build                       | 16 +++++
 lib/librte_hash/meson.build                        | 21 +++++++
 lib/librte_kvargs/meson.build                      | 10 ++++
 lib/librte_mbuf/meson.build                        | 10 ++++
 lib/librte_mbuf/rte_mbuf.h                         |  1 +
 lib/librte_mempool/meson.build                     | 10 ++++
 lib/librte_metrics/meson.build                     | 10 ++++
 lib/librte_net/meson.build                         | 19 ++++++
 lib/librte_ring/meson.build                        | 10 ++++
 lib/meson.build                                    | 12 ++++
 meson.build                                        | 70 ++++++++++++++++++++++
 meson_options.txt                                  |  2 +
 test/meson.build                                   |  1 +
 test/test/meson.build                              | 23 +++++++
 test/test/test.c                                   | 17 +++---
 42 files changed, 568 insertions(+), 16 deletions(-)
 create mode 100644 app/meson.build
 create mode 100644 app/test-pmd/meson.build
 create mode 100644 config/meson.build
 create mode 100644 config/rte_config.h
 create mode 100644 drivers/mempool/meson.build
 create mode 100644 drivers/mempool/ring/meson.build
 create mode 100644 drivers/mempool/stack/meson.build
 create mode 100644 drivers/meson.build
 create mode 100644 drivers/net/i40e/meson.build
 create mode 100644 drivers/net/meson.build
 create mode 100644 lib/librte_acl/meson.build
 create mode 100644 lib/librte_cmdline/meson.build
 create mode 100644 lib/librte_compat/meson.build
 create mode 100644 lib/librte_eal/common/arch/x86/meson.build
 create mode 120000 lib/librte_eal/common/arch/x86_64
 create mode 100644 lib/librte_eal/common/include/arch/x86/meson.build
 create mode 120000 lib/librte_eal/common/include/arch/x86_64
 create mode 100644 lib/librte_eal/common/include/meson.build
 create mode 100644 lib/librte_eal/linuxapp/eal/meson.build
 create mode 100644 lib/librte_eal/linuxapp/meson.build
 create mode 100644 lib/librte_eal/meson.build
 create mode 100644 lib/librte_ether/meson.build
 create mode 100644 lib/librte_hash/meson.build
 create mode 100644 lib/librte_kvargs/meson.build
 create mode 100644 lib/librte_mbuf/meson.build
 create mode 100644 lib/librte_mempool/meson.build
 create mode 100644 lib/librte_metrics/meson.build
 create mode 100644 lib/librte_net/meson.build
 create mode 100644 lib/librte_ring/meson.build
 create mode 100644 lib/meson.build
 create mode 100644 meson.build
 create mode 100644 meson_options.txt
 create mode 100644 test/meson.build
 create mode 100644 test/test/meson.build

-- 
2.9.4

             reply	other threads:[~2017-06-07 11:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 10:47 Bruce Richardson [this message]
2017-06-07 10:47 ` [dpdk-dev] [RFC PATCH] build for DPDK with meson and ninja Bruce Richardson
     [not found]   ` <CGME20170607143643eucas1p10bce80dca22034efc6402d5944a6a0ed@eucas1p1.samsung.com>
2017-06-07 14:36     ` [dpdk-dev] [dpdk-dev,RFC] " Ilya Maximets
2017-06-07 14:51       ` Bruce Richardson
2017-06-07 18:12   ` [dpdk-dev] [RFC PATCH] " Jerin Jacob
2017-06-08  8:43     ` Bruce Richardson
2017-06-08  7:20   ` Shreyansh Jain
2017-06-08  8:48     ` Bruce Richardson
2017-06-07 13:08 ` [dpdk-dev] [RFC PATCH] replace DPDK config and build system Van Haaren, Harry
     [not found]   ` <1496841784.25214.6.camel@gmail.com>
2017-06-07 13:27     ` Bruce Richardson
2017-06-07 23:26 ` Stephen Hemminger
2017-06-08  8:59   ` Bruce Richardson
2017-06-08 16:26     ` Stephen Hemminger
2017-06-08 18:07       ` Christian Ehrhardt
2017-06-08 18:21         ` Wiles, Keith
2017-06-09  9:05         ` Bruce Richardson
2017-06-09 18:06           ` Wiles, Keith
2017-06-20 13:34             ` Morten Brørup
2017-06-20 13:41               ` Bruce Richardson
2017-06-20 14:25                 ` Morten Brørup
2017-06-20 14:43                   ` Bruce Richardson
2017-06-22 17:14 ` Neil Horman
2017-06-22 20:27   ` Bruce Richardson

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=20170607104743.275149-1-bruce.richardson@intel.com \
    --to=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).