<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Hi,</span></p>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">I would like to get feedback on a proposed mbuf change before sending patches.</span></p>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Some deployments need a guaranteed private-data reservation in every packet mbuf, across
 multiple mbuf pools and across different consumers of the mbuf APIs.</span></p>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Today, each pktmbuf pool can request a private size when the pool is created. That works
 when the application owns all pool creation policy directly. However, not all relevant mbuf pools are necessarily created by application code. Some pools may be created by libraries, drivers, or other components outside direct application control.</span></p>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">One example already in DPDK is vhost crypto, which creates its own mbuf pool and supplies
 a private size for <code>struct vhost_crypto_data_req</code>. There are also driver-created pktmbuf-style pools, such as cnxk inline meta pools and TAP GSO context pools. These are examples of pool-creation paths where the application may not directly control
 the private-size value used at creation time.</span></p>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">A PMD-specific devarg could solve one instance of this problem, such as a single driver-created
 pool, but that seems too narrow if the requirement is not inherently PMD-specific. A deployment with multiple drivers, libraries, or other pool-creation paths outside application control could need the same base private-size adjustment. In that case, configuring
 the same value independently through component-specific options would be fragile and easy to get wrong.</span></p>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">The proposed generic model is to add a configurable base private size for pktmbuf pools.
 The effective private size would be:</span></p>
<pre><div style="text-align: left; text-indent: 0px; text-transform: none; font-size: 12pt; color: rgb(0, 0, 0);"><code>align(pool_requested_priv_size + application_base_priv_size,
      RTE_MBUF_PRIV_ALIGN)</code></div></pre>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">The tentative EAL option name is:</span></p>
<pre><div style="text-align: left; text-indent: 0px; text-transform: none; font-size: 12pt; color: rgb(0, 0, 0);"><code>--mbuf-base-priv-size=<size></code></div></pre>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">The intent is:</span></p>
<ul style="text-align: left;">
<li style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p role="presentation"><span style="text-transform: none;">default behavior remains unchanged when the option is not used;</span></p>
</li><li style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p role="presentation"><span style="text-transform: none;">the configured base size is added to the private size requested by each pktmbuf pool;</span></p>
</li><li style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p role="presentation"><span style="text-transform: none;">the final effective private size remains aligned to
<code>RTE_MBUF_PRIV_ALIGN</code>;</span></p>
</li><li style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p role="presentation"><span style="text-transform: none;">pool-specific private-data requests still work as they do today;</span></p>
</li><li style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p role="presentation"><span style="text-transform: none;">DPDK centralizes the policy so pools created outside application control can reserve the same base private-data space as application-created pools.</span></p>
</li></ul>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">This is not intended to define ownership or layout of the private area. It only ensures
 that a deployment can reserve a common base amount of private data consistently. Applications, drivers, libraries, or components would still be responsible for their own interpretation of the reserved private area.</span></p>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Questions for the list:</span></p>
<ol start="1" style="text-align: left;">
<li style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p role="presentation"><span style="text-transform: none;">Is a deployment-wide pktmbuf base private-size reservation something DPDK would consider acceptable?</span></p>
</li><li style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p role="presentation"><span style="text-transform: none;">Is <code>--mbuf-base-priv-size=<size></code> a reasonable name, or would another name better describe the intent?</span></p>
</li><li style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p role="presentation"><span style="text-transform: none;">Should DPDK expose the effective-size calculation as a helper so pool-creation paths outside application control can apply the same rule?</span></p>
</li><li style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p role="presentation"><span style="text-transform: none;">Would maintainers prefer consumer updates in the same series as example users, or as follow-up patches after the generic mbuf/EAL change is accepted?</span></p>
</li><li style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p role="presentation"><span style="text-transform: none;">Would maintainers prefer this to remain component-specific, even if more than one driver, library, or pool-creation path may need to apply the same base reservation?</span></p>
</li></ol>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">The main goal is to avoid downstream mbuf layout changes and avoid component-specific
 configuration drift, while still allowing deployments to reserve a consistent private-data area across all packet mbuf pools, including pools created outside direct application control.</span></p>
<p style="text-align: left; text-indent: 0px; text-transform: none;"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Thanks,<br>
Randy</span></p>
<div style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>