Skip to contentSkip to conversation

minor build enhancements and fixes

PATCH In review Bruce Richardson 2 participants 7 messages Sep 20, 2017 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover minor build enhancements and fixes

No major changes, just cleanups.

Bruce Richardson (3):
build: sort meson options alphabetically
build: fix driver install path
build/x86: add SSE cpuflags

 config/x86/meson.build | 10 ++++++++++
 meson.build            |  2 +-
 meson_options.txt      | 24 ++++++++++++++++--------
 3 files changed, 27 insertions(+), 9 deletions(-)
Signature · 1 line
2.13.5
#1 lore raw

PATCH 1/3 build: sort meson options alphabetically

Wrap each entry at the description value to avoid really long lines also.

---
 meson_options.txt | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)
meson_options.txt +16 -8
index fb945db91..29b548f5a 100644
@@ -1,10 +1,18 @@
-option('machine', type: 'string', value: 'native', description: 'set the target machine type')
-option('max_lcores', type: 'string', value: '128', description: 'maximum number of cores/threads supported by EAL')
-option('max_numa_nodes', type: 'string', value: '4', description: 'maximum number of NUMA nodes supported by EAL')
-option('use_hpet', type: 'boolean', value: false, description: 'use HPET timer in EAL')
 option('allow_invalid_socket_id', type: 'boolean', value: false,
 	description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly')
-option('enable_kmods', type: 'boolean', value: true, description: 'build kernel modules')
-option('kernel_dir', type: 'string', value: '', description: 'path to the kernel for building kernel modules')
-option('per_library_versions', type: 'boolean', value: true, description: 'true: each lib gets its own version number, false: DPDK version used for each lib')
-option('include_subdir_arch', type: 'string', value: '', description: 'subdirectory where to install arch-dependent headers')
+option('enable_kmods', type: 'boolean', value: true,
+	description: 'build kernel modules')
+option('include_subdir_arch', type: 'string', value: '',
+	description: 'subdirectory where to install arch-dependent headers')
+option('kernel_dir', type: 'string', value: '',
+	description: 'path to the kernel for building kernel modules')
+option('machine', type: 'string', value: 'native',
+	description: 'set the target machine type')
+option('max_lcores', type: 'string', value: '128',
+	description: 'maximum number of cores/threads supported by EAL')
+option('max_numa_nodes', type: 'string', value: '4',
+	description: 'maximum number of NUMA nodes supported by EAL')
+option('per_library_versions', type: 'boolean', value: true,
+	description: 'true: each lib gets its own version number, false: DPDK version used for each lib')
+option('use_hpet', type: 'boolean', value: false,
+	description: 'use HPET timer in EAL')
Signature · 1 line
2.13.5
#2 lore raw

PATCH 2/3 build: fix driver install path

In reply to Bruce Richardson

To comply with the "hier" standard [Ref: man 7 hier], the driver .so files should not be placed in $datadir. Therefore we install them in a sub-directory of $libdir instead.

Fixes d123bba2dfbe ("build: add initial infrastructure for meson & ninja builds")
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
index 41426a706..6e4752562 100644
@@ -48,7 +48,7 @@ dpdk_extra_ldflags = []
 if get_option('default_library') == 'static'
 	driver_install_path = get_option('libdir')
 else
-	driver_install_path = join_paths(get_option('datadir'), 'dpdk/drivers')
+	driver_install_path = join_paths(get_option('libdir'), 'dpdk/drivers')
 endif
 
 # configure the build, and make sure configs here and in config folder are
Signature · 1 line
2.13.5
#3 lore raw

Re: [PATCH 2/3] build: fix driver install path

+Timothy, since git doesn't seem to automatically add reporters on CC.

Quoted 28 lines · Bruce Richardson

To comply with the "hier" standard [Ref: man 7 hier], the driver .so files should not be placed in $datadir. Therefore we install them in a sub-directory of $libdir instead.

Fixes d123bba2dfbe ("build: add initial infrastructure for meson & ninja builds")
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
index 41426a706..6e4752562 100644
@@ -48,7 +48,7 @@ dpdk_extra_ldflags = []
 if get_option('default_library') == 'static'
 	driver_install_path = get_option('libdir')
 else
-	driver_install_path = join_paths(get_option('datadir'), 'dpdk/drivers')
+	driver_install_path = join_paths(get_option('libdir'), 'dpdk/drivers')
 endif
 
 # configure the build, and make sure configs here and in config folder are
Signature · 1 line
2.13.5
#4 lore raw

PATCH 3/3 build/x86: add SSE cpuflags

In reply to Bruce Richardson

Previous code only added in AVX, and a few other non-SSE flags to the compile-time cpuflags because all SSE instruction set levels are now required for an x86 build. However, some apps may still be checking for the existing SSE ones in the legacy build system, so add them here for completeness and compatibility.

---
 config/x86/meson.build | 10 ++++++++++
 1 file changed, 10 insertions(+)
config/x86/meson.build +10 -0
index 0d1a532ad..c05c2f418 100644
@@ -40,6 +40,12 @@ if cc.get_define('__SSE4_2__', args: march_opt) == ''
 	error(sse_errormsg)
 endif
 
+base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']
+foreach f:base_flags
+	dpdk_conf.set('RTE_MACHINE_CPUFLAG_' + f, 1)
+	compile_time_cpuflags += ['RTE_CPUFLAG_' + f]
+endforeach
+
 dpdk_conf.set('RTE_ARCH_X86', 1)
 if (host_machine.cpu_family() == 'x86_64')
 	dpdk_conf.set('RTE_ARCH_X86_64', 1)
@@ -66,5 +72,9 @@ if cc.get_define('__AVX2__', args: march_opt) != ''
 	dpdk_conf.set('RTE_MACHINE_CPUFLAG_AVX2', 1)
 	compile_time_cpuflags += ['RTE_CPUFLAG_AVX2']
 endif
+if cc.get_define('__AVX512F__', args: march_opt) != ''
+	dpdk_conf.set('RTE_MACHINE_CPUFLAG_AVX512F', 1)
+	compile_time_cpuflags += ['RTE_CPUFLAG_AVX512F']
+endif
 
 dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
Signature · 1 line
2.13.5
Acked-by on the v1 series
#5 lore raw
In reply to Bruce Richardson
Quoted 11 lines · Bruce Richardson

No major changes, just cleanups.

Bruce Richardson (3):
  build: sort meson options alphabetically
  build: fix driver install path
  build/x86: add SSE cpuflags

 config/x86/meson.build | 10 ++++++++++ meson.build            |  2 +- meson_options.txt      | 24 ++++++++++++++++--------

 3 files changed, 27 insertions(+), 9 deletions(-)

Looks good, thanks!

Signature · 2 lines
Kind regards,
Luca Boccassi
#6 lore raw
Quoted 8 lines · Luca Boccassi
Quoted 7 lines · Bruce Richardson

No major changes, just cleanups.

Bruce Richardson (3):
  build: sort meson options alphabetically
  build: fix driver install path
  build/x86: add SSE cpuflags

Quoted 7 lines
Quoted 4 lines

 config/x86/meson.build | 10 ++++++++++ meson.build            |  2 +- meson_options.txt      | 24 ++++++++++++++++--------

 3 files changed, 27 insertions(+), 9 deletions(-)

Applied to dpdk-next-build.

/Bruce