[v2] build: make buffer headroom configurable
Checks
Commit Message
The default value for RTE_PKTMBUF_HEADROOM used to be set in
config/rte_config.h. This patch removes it from the file and
instead, a meson option, pkt_mbuf_headroom, is introduced to make
headroom tunable from the build process.
Signed-off-by: Parthakumar Roy <Parthakumar.Roy@ibm.com>
---
config/meson.build | 1 +
config/rte_config.h | 1 -
meson_options.txt | 2 ++
3 files changed, 3 insertions(+), 1 deletion(-)
Comments
On Tue, Feb 20, 2024 at 02:57:35PM +0000, Parthakumar Roy wrote:
> The default value for RTE_PKTMBUF_HEADROOM used to be set in
> config/rte_config.h. This patch removes it from the file and
> instead, a meson option, pkt_mbuf_headroom, is introduced to make
> headroom tunable from the build process.
>
> Signed-off-by: Parthakumar Roy <Parthakumar.Roy@ibm.com>
> ---
> config/meson.build | 1 +
> config/rte_config.h | 1 -
> meson_options.txt | 2 ++
> 3 files changed, 3 insertions(+), 1 deletion(-)
>
While this is not likely a setting that many will need to change, it's not
the first time I've heard of users looking to adjust it.
Because it's such a simple change, I'd support having this accessible for
easy config by end-users.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Tuesday, 27 February 2024 17.02
>
> While this is not likely a setting that many will need to change, it's
> not
> the first time I've heard of users looking to adjust it.
>
> Because it's such a simple change, I'd support having this accessible
> for
> easy config by end-users.
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
+1 to what Bruce said.
Acked-by: Morten Brørup <mb@smartsharesystems.com>
27/02/2024 17:10, Morten Brørup:
> > From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> > Sent: Tuesday, 27 February 2024 17.02
> >
> > While this is not likely a setting that many will need to change, it's
> > not
> > the first time I've heard of users looking to adjust it.
> >
> > Because it's such a simple change, I'd support having this accessible
> > for
> > easy config by end-users.
> >
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
> +1 to what Bruce said.
>
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
Changed the definition to something shorter:
"Default data offset (in bytes) in a packet buffer to leave room for additional headers."
Applied, thanks.
@@ -346,6 +346,7 @@ dpdk_conf.set('RTE_MAX_ETHPORTS', get_option('max_ethports'))
dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet'))
dpdk_conf.set('RTE_ENABLE_STDATOMIC', get_option('enable_stdatomic'))
dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp'))
+dpdk_conf.set('RTE_PKTMBUF_HEADROOM', get_option('pkt_mbuf_headroom'))
# values which have defaults which may be overridden
dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)
dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64)
@@ -51,7 +51,6 @@
/* mbuf defines */
#define RTE_MBUF_DEFAULT_MEMPOOL_OPS "ring_mp_mc"
-#define RTE_PKTMBUF_HEADROOM 128
/* ether defines */
#define RTE_MAX_QUEUES_PER_PORT 1024
@@ -40,6 +40,8 @@ option('machine', type: 'string', value: 'auto', description:
'Alias of cpu_instruction_set.')
option('max_ethports', type: 'integer', value: 32, description:
'maximum number of Ethernet devices')
+option('pkt_mbuf_headroom', type: 'integer', value: 128, description:
+ 'number of bytes skipped on Rx at the start of the packet buffer to leave room for additional packet headers')
option('max_lcores', type: 'string', value: 'default', description:
'Set maximum number of cores/threads supported by EAL; "default" is different per-arch, "detect" detects the number of cores on the build machine.')
option('max_numa_nodes', type: 'string', value: 'default', description: