DPDK patches and discussions
 help / color / mirror / Atom feed
From: Parthakumar Roy <partha.roy.tx@gmail.com>
To: dev@dpdk.org
Cc: Parthakumar Roy <Parthakumar.Roy@ibm.com>
Subject: [PATCH v2] build: make buffer headroom configurable
Date: Tue, 20 Feb 2024 14:57:35 +0000	[thread overview]
Message-ID: <20240220145735.383949-1-Parthakumar.Roy@ibm.com> (raw)
In-Reply-To: <DS0PR15MB55751C8B5830DE77981C8978E74D2@DS0PR15MB5575.namprd15.prod.outlook.com>

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(-)

diff --git a/config/meson.build b/config/meson.build
index a9ccd56deb..f90ff0a290 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -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)
diff --git a/config/rte_config.h b/config/rte_config.h
index da265d7dd2..505199f2fe 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -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
diff --git a/meson_options.txt b/meson_options.txt
index 50a9d3669d..68f378c401 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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:
-- 
2.34.1


  parent reply	other threads:[~2024-02-27  6:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 19:02 meson option to customize RTE_PKTMBUF_HEADROOM patch Parthakumar Roy
2024-02-16  7:52 ` David Marchand
2024-02-20 14:57 ` Parthakumar Roy [this message]
2024-02-27 16:02   ` [PATCH v2] build: make buffer headroom configurable Bruce Richardson
2024-02-27 16:10     ` Morten Brørup
2024-03-06 16:45       ` Thomas Monjalon
2024-03-23 20:51 ` meson option to customize RTE_PKTMBUF_HEADROOM patch Garrett D'Amore
2024-03-25 10:01   ` Bruce Richardson
2024-03-25 17:20     ` Stephen Hemminger
2024-03-25 22:56       ` Garrett D'Amore
2024-03-26  8:05         ` Morten Brørup
2024-03-26 14:19           ` Garrett D'Amore
2024-03-26 15:06             ` Morten Brørup
2024-03-26 17:43               ` Garrett D'Amore
2024-03-26 20:35                 ` Stephen Hemminger
2024-03-26 21:10                   ` Garrett D'Amore
2024-03-26 16:14             ` Konstantin Ananyev
2024-03-26 17:44               ` Garrett D'Amore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240220145735.383949-1-Parthakumar.Roy@ibm.com \
    --to=partha.roy.tx@gmail.com \
    --cc=Parthakumar.Roy@ibm.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).