add_project_link_arguments('-lm', language: 'c')
dpdk_extra_ldflags += '-lm'
+# check for libraries used in multiple places in DPDK
+has_libnuma = 0
+numa_dep = cc.find_library('numa', required: false)
+if numa_dep.found() and cc.has_header('numaif.h')
+ dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
+ has_libnuma = 1
+ add_project_link_arguments('-lnuma', language: 'c')
+ dpdk_extra_ldflags += '-lnuma'
+endif
+
# add -include rte_config to cflags
add_project_arguments('-include', 'rte_config.h', language: 'c')
]
eal_extra_link_arg = '-ldl'
+if has_libnuma == 1
+ dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
+endif
if get_option('per_library_versions')
lib_version = '@0@.1'.format(version)
if host_machine.system() != 'linux'
build = false
endif
+if has_libnuma == 1
+ dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
+endif
version = 4
allow_experimental_apis = true
sources = files('fd_man.c', 'iotlb.c', 'socket.c', 'vhost.c', 'vhost_user.c',