[dpdk-dev] [RFC PATCH] build for DPDK with meson and ninja

Bruce Richardson bruce.richardson at intel.com
Thu Jun 8 10:48:11 CEST 2017


On Thu, Jun 08, 2017 at 12:50:38PM +0530, Shreyansh Jain wrote:
> Hello Bruce,
> 
> On Wednesday 07 June 2017 04:17 PM, Bruce Richardson wrote:
> > to use, need to have meson >= 0.4 and ninja-build packages installed.
> > 
> > Then do the following in main DPDK directory:
> > 
> > meson build
> > cd build
> > ninja
> > sudo ninja install
> > 
> > This will compile up some DPDK libs, the FVL PMD and testpmd and install
> > them in /usr/local/. [On Fedora you will need to add /usr/local/lib64 to
> > your ld path, it's not there by default.]
> > Then you can run testpmd as e.g.
> > 
> 
> <...snip...>
> 
> > diff --git a/test/test/meson.build b/test/test/meson.build
> > new file mode 100644
> > index 0000000..cc85408
> > --- /dev/null
> > +++ b/test/test/meson.build
> > @@ -0,0 +1,23 @@
> > +executable('dpdk-test',
> > +	sources: [
> > +		'commands.c',
> > +		'packet_burst_generator.c',
> > +		'test.c',
> > +		'test_acl.c',
> > +		'test_cmdline.c',
> > +		'test_cmdline_cirbuf.c',
> > +		'test_cmdline_etheraddr.c',
> > +		'test_cmdline_ipaddr.c',
> > +		'test_cmdline_lib.c',
> > +		'test_cmdline_num.c',
> > +		'test_cmdline_portlist.c',
> > +		'test_cmdline_string.c',
> > +		'test_cpuflags.c',
> > +		'test_mp_secondary.c',
> > +		'test_pmd_perf.c',
> > +		'test_ring.c',
> > +		'test_ring_perf.c'
> > +	],
> > +	dependencies: [rte_eal, rte_ring, rte_mempool, rte_cmdline,
> > +		rte_mbuf, rte_net, rte_ether, rte_acl],
> > +	install: true)
> 
> <..snip..>
> 
> I tried this with x86 and it worked like a charm. Really nice and clean
> way to build DPDK - and super fast. Awesome.
> 
> I want to use this for an ARM target. Any idea what I should change in
> meson.build? Or, is that even straightforward?
> (Yes, I can lookup documentation for meson - just being lazy. If you
> don't have much idea, I will give this a spin on ARM in a couple of
> days)
> 
I haven't looked to see how to get it to work on arm - I just wanted to
get some sort of prototype out and get feedback before I invested too
much extra time into this. :-) I suggest to start by checking what the
"host_machine" structure reports for your arm targets and work from
there. See librte_eal/common/include/meson.build:

subdir('arch/@0@'.format(host_machine.cpu_family()))

I also was learning meson on-the-fly while working on this, so I'm by no
means an expert.

/Bruce


More information about the dev mailing list