From: Bruce Richardson <bruce.richardson@intel.com>
To: "Randy Tice (rtice)" <rtice@cisco.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [RFC] mbuf: add configurable base private size for pktmbuf pools
Date: Tue, 1 Sep 2026 13:21:03 +0100 [thread overview]
Message-ID: <apbDL2mTUpOojbGl@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <PH0PR11MB76163DCD87BB40C437CB54C8A9A92@PH0PR11MB7616.namprd11.prod.outlook.com>
On Mon, Aug 31, 2026 at 06:20:19PM +0000, Randy Tice (rtice) wrote:
> Hi,
>
> I would like to get feedback on a proposed mbuf change before sending
> patches.
>
> Some deployments need a guaranteed private-data reservation in every
> packet mbuf, across multiple mbuf pools and across different consumers
> of the mbuf APIs.
>
> 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.
>
> One example already in DPDK is vhost crypto, which creates its own mbuf
> pool and supplies a private size for struct vhost_crypto_data_req.
> 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.
>
My 2c.
Rather than having a fixed build-time, or a configurable runtime set
private mbuf data size, I think the main thing to be fixed here is to
ensure that all cases where mbuf pools are created, the private data size
is configurable in those cases.
/Bruce
> 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.
>
> The proposed generic model is to add a configurable base private size
> for pktmbuf pools. The effective private size would be:
>
> align(pool_requested_priv_size + application_base_priv_size,
> RTE_MBUF_PRIV_ALIGN)
>
> The tentative EAL option name is:
>
> --mbuf-base-priv-size=<size>
>
> The intent is:
> * default behavior remains unchanged when the option is not used;
> * the configured base size is added to the private size requested by
> each pktmbuf pool;
> * the final effective private size remains aligned to
> RTE_MBUF_PRIV_ALIGN;
> * pool-specific private-data requests still work as they do today;
> * DPDK centralizes the policy so pools created outside application
> control can reserve the same base private-data space as
> application-created pools.
>
> 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.
>
> Questions for the list:
> 1. Is a deployment-wide pktmbuf base private-size reservation
> something DPDK would consider acceptable?
> 2. Is --mbuf-base-priv-size=<size> a reasonable name, or would another
> name better describe the intent?
> 3. Should DPDK expose the effective-size calculation as a helper so
> pool-creation paths outside application control can apply the same
> rule?
> 4. 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?
> 5. 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?
>
> 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.
>
> Thanks,
> Randy
next prev parent reply other threads:[~2026-09-01 12:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 18:20 [RFC] mbuf: add configurable base private size for pktmbuf pools Randy Tice (rtice)
2026-09-01 2:55 ` Stephen Hemminger
2026-09-01 7:31 ` Konstantin Ananyev
2026-09-01 11:11 ` Morten Brørup
2026-09-01 15:43 ` Randy Tice (rtice)
2026-09-01 16:22 ` Morten Brørup
2026-09-01 16:36 ` Morten Brørup
2026-09-01 17:01 ` Randy Tice (rtice)
2026-09-01 17:09 ` Konstantin Ananyev
2026-09-01 20:00 ` Randy Tice (rtice)
2026-09-01 12:21 ` Bruce Richardson [this message]
2026-09-01 16:03 ` Randy Tice (rtice)
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=apbDL2mTUpOojbGl@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=rtice@cisco.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.