+ dpdk_conf.set('RTE_MAX_LCORE', max_lcores)
+elif max_lcores != 'default'
+ # overwrite the default value from arch_subdir with user input
+ dpdk_conf.set('RTE_MAX_LCORE', max_lcores.to_int())
+endif
+
+max_numa_nodes = get_option('max_numa_nodes')
+if max_numa_nodes == 'detect'
+ # discovery makes sense only for non-cross builds
+ if meson.is_cross_build()
+ error('Discovery of max_numa_nodes not supported for cross-compilation.')
+ endif
+ # overwrite the default value with discovered values
+ max_numa_nodes = run_command(get_numa_count_cmd).stdout().to_int()
+ message('Found @0@ numa nodes'.format(max_numa_nodes))
+ dpdk_conf.set('RTE_MAX_NUMA_NODES', max_numa_nodes)
+elif max_numa_nodes != 'default'
+ # overwrite the default value from arch_subdir with user input
+ dpdk_conf.set('RTE_MAX_NUMA_NODES', max_numa_nodes.to_int())
+endif
+
+# check that CPU and NUMA counts are set
+if not dpdk_conf.has('RTE_MAX_LCORE')
+ error('Number of CPU cores not specified.')
+endif
+if not dpdk_conf.has('RTE_MAX_NUMA_NODES')
+ error('Number of NUMA nodes not specified.')