@@ -179,6 +179,10 @@ endif
# add -include rte_config to cflags
add_project_arguments('-include', 'rte_config.h', language: 'c')
+if get_option('rte_debug')
+ dpdk_conf.set('RTE_DEBUG', 1)
+endif
+
# enable extra warnings and disable any unwanted warnings
warning_flags = [
# -Wall is added by meson by default, so add -Wextra only
@@ -9,3 +9,4 @@ drivers = ['null', 'turbo_sw', 'fpga_lte_fec', 'fpga_5gnr_fec']
config_flag_fmt = 'RTE_LIBRTE_PMD_BBDEV_@0@'
driver_name_fmt = 'rte_pmd_bbdev_@0@'
+rte_debug_fmt = 'RTE_DEBUG_BASEBAND_@0@'
@@ -5,3 +5,4 @@ drivers = ['dpaa', 'fslmc', 'ifpga', 'pci', 'vdev', 'vmbus']
std_deps = ['eal']
config_flag_fmt = 'RTE_LIBRTE_@0@_BUS'
driver_name_fmt = 'rte_bus_@0@'
+rte_debug_fmt = 'RTE_DEBUG_BUS_@0@'
@@ -9,3 +9,4 @@ std_deps = ['eal']
drivers = ['cpt', 'dpaax', 'iavf', 'mlx5', 'mvep', 'octeontx', 'octeontx2', 'qat']
config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON'
driver_name_fmt = 'rte_common_@0@'
+rte_debug_fmt = 'RTE_DEBUG_COMMON_@0@'
@@ -10,3 +10,4 @@ drivers = ['isal', 'octeontx', 'qat', 'zlib']
std_deps = ['compressdev'] # compressdev pulls in all other needed deps
config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
driver_name_fmt = 'rte_pmd_@0@'
+rte_debug_fmt = 'RTE_DEBUG_COMPRESS_@0@'
@@ -28,3 +28,4 @@ drivers = ['aesni_gcm',
std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
driver_name_fmt = 'rte_pmd_@0@'
+rte_debug_fmt = 'RTE_DEBUG_CRYPTO_@0@'
@@ -13,3 +13,4 @@ endif
std_deps = ['eventdev', 'kvargs']
config_flag_fmt = 'RTE_LIBRTE_@0@_EVENTDEV_PMD'
driver_name_fmt = 'rte_pmd_@0@_event'
+rte_debug_fmt = 'RTE_DEBUG_EVENT_@0@'
@@ -9,3 +9,4 @@ drivers = ['bucket', 'dpaa', 'dpaa2', 'octeontx', 'octeontx2', 'ring', 'stack']
std_deps = ['mempool']
config_flag_fmt = 'RTE_LIBRTE_@0@_MEMPOOL'
driver_name_fmt = 'rte_mempool_@0@'
+rte_debug_fmt = 'RTE_DEBUG_MEMPOOL_@0@'
@@ -99,6 +99,9 @@ foreach class:dpdk_driver_classes
fmt_name = name
endif
dpdk_conf.set(config_flag_fmt.format(fmt_name.to_upper()),1)
+ if get_option('rte_debug')
+ dpdk_conf.set(rte_debug_fmt.format(fmt_name.to_upper()),1)
+ endif
lib_name = driver_name_fmt.format(fmt_name)
dpdk_extra_ldflags += pkgconfig_extra_libs
@@ -60,3 +60,4 @@ std_deps += ['bus_pci'] # very many PMDs depend on PCI, so make std
std_deps += ['bus_vdev'] # same with vdev bus
config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
driver_name_fmt = 'rte_pmd_@0@'
+rte_debug_fmt = 'RTE_DEBUG_NET_@0@'
@@ -13,3 +13,4 @@ drivers = ['dpaa2_cmdif', 'dpaa2_qdma',
std_deps = ['rawdev']
config_flag_fmt = 'RTE_LIBRTE_PMD_@0@_RAWDEV'
driver_name_fmt = 'rte_rawdev_@0@'
+rte_debug_fmt = 'RTE_DEBUG_RAW_@0@'
@@ -11,3 +11,4 @@ std_deps = ['bus_pci', 'kvargs']
std_deps += ['vhost']
config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
driver_name_fmt = 'rte_pmd_@0@'
+rte_debug_fmt = 'RTE_DEBUG_VDPA_@0@'
@@ -99,6 +99,10 @@ foreach l:libraries
dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1)
install_headers(headers)
+ if get_option('rte_debug')
+ dpdk_conf.set('RTE_DEBUG_' + name.to_upper(), 1)
+ endif
+
libname = 'rte_' + name
includes += include_directories(dir_name)
@@ -32,6 +32,8 @@ option('max_numa_nodes', type: 'integer', value: 4,
description: 'maximum number of NUMA nodes supported by EAL')
option('enable_trace_fp', type: 'boolean', value: false,
description: 'enable fast path trace points.')
+option('rte_debug', type: 'boolean', value: false,
+ description: 'build with additional sanity checks, validations and logs')
option('tests', type: 'boolean', value: true,
description: 'build unit tests')
option('use_hpet', type: 'boolean', value: false,