<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">So we right now (at WEKA) have a somewhat older version of DPDK that we have customized heavily, and I am going to to need to to make the headroom *dynamic* (passed in at run time, and per port.)<br />
<br />
We have this requirement because we need payload to be at a specific offset, but have to deal with different header lengths for IPv4 and now IPv6. <br />
<br />
My reason for pointing this out, is that I would dearly like if we could collaborate on this -- this change is going to touch pretty much every PMD (we don't need it on all of them as we only support a subset of PMDs, but its still a significant set.)<br />
<br />
I'm not sure if anyone else has considered such a need -- this particular message caught my eye as I'm looking specifically in this area right now.</div>
</div>
<div name="messageReplySection">On Feb 15, 2024 at 11:02 AM -0800, Parthakumar Roy <Parthakumar.Roy@ibm.com>, wrote:<br />
<blockquote type="cite">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">Hello,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">Bruce Richardson suggested that I submit this patch - at IBM we needed to adjust the <code>pkt_mbuf_headroom</code>​ for our application to work. This is my first ever patch through a mailing list, I have only done it through Pull Requests before, so let me know if I need to correct something.<br />
<br />
Message:<br />
    Add meson configuration option to adjust RTE_PKTMBUF_HEADROOM</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof"><br /></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">diff --git a/config/meson.build b/config/meson.build</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">index 7cd375e991..43b765ade1 100644</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">--- a/config/meson.build</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">+++ b/config/meson.build</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">@@ -304,6 +304,7 @@ endforeach</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>dpdk_conf.set('RTE_MAX_ETHPORTS', get_option('max_ethports'))</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet'))</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp'))</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">+dpdk_conf.set('RTE_PKTMBUF_HEADROOM', get_option('pkt_mbuf_headroom'))</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span># values which have defaults which may be overridden</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64)</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">diff --git a/config/rte_config.h b/config/rte_config.h</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">index 7b8c85e948..a2bb4ea61b 100644</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">--- a/config/rte_config.h</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">+++ b/config/rte_config.h</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">@@ -51,7 +51,6 @@</span></p>
<p style="font-family:Menlo;margin:0px;min-height:19px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px"><span style="margin:0px" class="ContentPasted0"> </span></span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>/* mbuf defines */</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>#define RTE_MBUF_DEFAULT_MEMPOOL_OPS "ring_mp_mc"</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">-#define RTE_PKTMBUF_HEADROOM 128</span></p>
<p style="font-family:Menlo;margin:0px;min-height:19px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px"><span style="margin:0px" class="ContentPasted0"> </span></span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>/* ether defines */</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>#define RTE_MAX_QUEUES_PER_PORT 1024</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">diff --git a/meson_options.txt b/meson_options.txt</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">index 08528492f7..169fcc94c7 100644</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">--- a/meson_options.txt</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">+++ b/meson_options.txt</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">@@ -36,6 +36,8 @@ option('machine', type: 'string', value: 'auto', description:</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0">       <span class="ContentPasted0"> </span></span>'Alias of cpu_instruction_set.')</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>option('max_ethports', type: 'integer', value: 32, description:</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0">       <span class="ContentPasted0"> </span></span>'maximum number of Ethernet devices')</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">+option('pkt_mbuf_headroom', type: 'integer', value: 128, description:</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0">+<span class="ContentPasted0"> </span><span style="margin:0px" class="ContentPasted0">     <span class="ContentPasted0"> </span></span>'<span style="font-family:Menlo, serif;background-color:rgb(255, 255, 255);display:inline !important">number of bytes skipped on Rx at the start of the packet buffer to leave room for additional packet headers</span>')</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>option('max_lcores', type: 'string', value: 'default', description:</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0">       <span class="ContentPasted0"> </span></span>'Set maximum number of cores/threads supported by EAL; "default" is different per-arch, "detect" detects the number of cores on the build machine.')</span></p>
<p style="font-family:Menlo;margin:0px"><span style="font-variant-ligatures:no-common-ligatures;margin:0px" class="ContentPasted0"><span style="margin:0px" class="ContentPasted0"> </span>option('max_numa_nodes', type: 'string', value: 'default', description:</span></p>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof"><br /></div>
</blockquote>
</div>
</body>
</html>