[PATCH 1/2] config: add mbuf burst size configuration
pbhagavatula at marvell.com
pbhagavatula at marvell.com
Sat Feb 21 00:07:43 CET 2026
From: Pavan Nikhilesh <pbhagavatula at marvell.com>
Add configurable mbuf burst size macros:
- RTE_MBUF_BURST_SIZE_THROUGHPUT: optimized for throughput (default 32)
- RTE_MBUF_BURST_SIZE_LATENCY: optimized for low latency (default 4)
- RTE_MBUF_BURST_SIZE_DEFAULT: references the selected profile
Add meson option 'mbuf_burst_size_default' to select between
'throughput' (default) and 'latency' profiles.
Platform-specific configurations can override
RTE_MBUF_BURST_SIZE_THROUGHPUT.
Set to 64 for CN10K which benefits from larger bursts.
Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
---
v1 Changes:
- Renamed RTE_OPTIMAL_BURST_SIZE to RTE_MBUF_BURST_SIZE_DEFAULT,
- Added RTE_MBUF_BURST_SIZE_THROUGHPUT/RTE_MBUF_BURST_SIZE_LATENCY
macros with meson option mbuf_burst_size_default to select profile.
config/arm/meson.build | 1 +
config/meson.build | 15 +++++++++++++++
meson_options.txt | 2 ++
3 files changed, 18 insertions(+)
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 523b0fc0ed50..1b2cdbd25774 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -481,6 +481,7 @@ soc_cn10k = {
['RTE_MAX_LCORE', 24],
['RTE_MAX_NUMA_NODES', 1],
['RTE_MEMPOOL_ALIGN', 128],
+ ['RTE_MBUF_BURST_SIZE_THROUGHPUT', 64],
],
'part_number': '0xd49',
'extra_march_features': ['crypto'],
diff --git a/config/meson.build b/config/meson.build
index 02e2798ccaf1..578b561a4fd1 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -393,10 +393,25 @@ if get_option('mbuf_refcnt_atomic')
endif
dpdk_conf.set10('RTE_IOVA_IN_MBUF', get_option('enable_iova_as_pa'))
+# Recommended mbuf burst sizes for generic applications.
+# Platform-specific configs may override these values.
+# RTE_MBUF_BURST_SIZE_THROUGHPUT: Burst size optimized for throughput.
+dpdk_conf.set('RTE_MBUF_BURST_SIZE_THROUGHPUT', 32)
+# RTE_MBUF_BURST_SIZE_LATENCY: Burst size optimized for low latency.
+dpdk_conf.set('RTE_MBUF_BURST_SIZE_LATENCY', 4)
+
compile_time_cpuflags = []
subdir(arch_subdir)
dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
+# RTE_MBUF_BURST_SIZE_DEFAULT: Default burst size used by examples and testpmd.
+# Controlled by -Dmbuf_burst_size_default option (throughput or latency).
+if get_option('mbuf_burst_size_default') == 'latency'
+ dpdk_conf.set('RTE_MBUF_BURST_SIZE_DEFAULT', 'RTE_MBUF_BURST_SIZE_LATENCY')
+else
+ dpdk_conf.set('RTE_MBUF_BURST_SIZE_DEFAULT', 'RTE_MBUF_BURST_SIZE_THROUGHPUT')
+endif
+
# apply cross-specific options
if meson.is_cross_build()
# configure RTE_MAX_LCORE and RTE_MAX_NUMA_NODES from cross file
diff --git a/meson_options.txt b/meson_options.txt
index e28d24054cf1..2caf0be91d39 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,6 +46,8 @@ option('enable_iova_as_pa', type: 'boolean', value: true, description:
'Support the use of physical addresses for IO addresses, such as used by UIO or VFIO in no-IOMMU mode. When disabled, DPDK can only run with IOMMU support for address mappings, but will have more space available in the mbuf structure.')
option('mbuf_refcnt_atomic', type: 'boolean', value: true, description:
'Atomically access the mbuf refcnt.')
+option('mbuf_burst_size_default', type: 'combo', choices: ['throughput', 'latency'], value: 'throughput', description:
+ 'Default mbuf burst size profile: throughput-optimized or latency-optimized.')
option('platform', type: 'string', value: 'native', description:
'Platform to build, either "native", "generic" or a SoC. Please refer to the Linux build guide for more information.')
option('pkt_mbuf_headroom', type: 'integer', value: 128, description:
--
2.50.1 (Apple Git-155)
More information about the dev
mailing list