From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Randy L Tice" <rtice@cisco.com>, <dev@dpdk.org>
Cc: "Bruce Richardson" <bruce.richardson@intel.com>,
"Harman Kalra" <hkalra@marvell.com>,
"Stephen Hemminger" <stephen@networkplumber.org>
Subject: RE: [PATCH v3 1/1] mbuf: add optional no-copy dynamic field storage
Date: Tue, 29 Sep 2026 09:15:28 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35F65A85@smartserver.smartshare.dk> (raw)
In-Reply-To: <179061941387.2.13690688541375502570.v3-0001-mbuf-add-optional-no-copy-dynamic-field-storage.patch@cisco.com>
Yes, this is the solution I was looking for. Thank you.
Nitpicking...
Could you use with a more meaningful name than dynfield3, e.g. dynfield_nc or dynfield_no_copy.
A few minor clarifications suggested inline below.
With or without suggested changes,
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
> --- a/doc/guides/prog_guide/mbuf_lib.rst
> +++ b/doc/guides/prog_guide/mbuf_lib.rst
> @@ -234,6 +234,15 @@ The dynamic fields and flags are managed with the
> functions ``rte_mbuf_dyn*``.
>
> It is not possible to unregister fields or flags.
>
> +The build option ``mbuf_dynfield3_size`` can add extra cache-line-
> aligned
> +dynamic field storage to ``struct rte_mbuf``. This increases every
> mbuf by
"increases every mbuf" -> "increases the size of every mbuf"
> +the configured amount and changes the mbuf layout, so applications and
> +secondary processes must be built with the same value as the primary
> process.
> +The option defaults to ``0``. The extra storage is reserved for
> dynamic
> +fields registered with ``RTE_MBUF_DYNFIELD_F_NO_COPY``. These fields
> are not
> +copied by mbuf copy and clone operations. Dynamic fields registered
> without
> +this flag continue to use the existing copied dynamic-field storage.
> +
> .. _direct_indirect_buffer:
>
> Direct and Indirect Buffers
> diff --git a/doc/guides/rel_notes/release_26_11.rst
> b/doc/guides/rel_notes/release_26_11.rst
> index dec96ccbc7..cff68d7034 100644
> --- a/doc/guides/rel_notes/release_26_11.rst
> +++ b/doc/guides/rel_notes/release_26_11.rst
> @@ -60,6 +60,22 @@ New Features
> Added the experimental ``rte_cpu_socket_id()`` function
> to map an OS logical CPU ID to the NUMA socket containing that CPU.
>
> +* **Added optional extra mbuf dynamic field storage.**
> +
> + Added ``mbuf_dynfield3_size`` build option to enable a
> + cache-line-aligned ``dynfield3`` area in ``struct rte_mbuf``.
> + The configured size is defined as ``RTE_MBUF_DYNFIELD3_SIZE``
> + in ``rte_build_config.h``.
> + The extra storage is reserved for dynamic fields registered with
> + ``RTE_MBUF_DYNFIELD_F_NO_COPY``.
> + These fields are not copied by generic mbuf copy and clone
> operations.
> + Dynamic fields registered without this flag continue to use the
> existing
> + copied dynamic-field storage.
> + Applications and secondary processes must be built with the same
> + non-zero value as the primary process.
"with the same non-zero value" ->"with the same value"
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -44,6 +44,8 @@ option('max_numa_nodes', type: 'string', value:
> 'default', description:
> 'Set the highest NUMA node supported by EAL; "default" is
> different per-arch, "detect" detects the highest NUMA node on the build
> machine.')
> option('enable_iova_as_pa', type: 'boolean', value: true, description:
> 'Support the use of physical addresses for IO addresses, such
> as used by UIO or VFIO in no-IOMMU mode. When disabled, DPDK can only
> run with IOMMU support for address mappings, but will have more space
> available in the mbuf structure.')
> +option('mbuf_dynfield3_size', type: 'integer', min: 0, value: 0,
> description:
> + 'Size of optional extra mbuf dynamic field area, in bytes.')
The description of this option should mention that the area is for mbuf dynamic fields with the no-copy property.
> option('mbuf_refcnt_atomic', type: 'boolean', value: true,
> description:
> 'Atomically access the mbuf refcnt.')
> option('platform', type: 'string', value: 'native', description:
> --
> 2.35.6
next prev parent reply other threads:[~2026-09-29 7:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 19:37 [PATCH 0/1] mbuf: add optional dynfield3 storage Randy L Tice
2026-09-24 19:37 ` [PATCH 1/1] " Randy L Tice
2026-09-25 9:48 ` Morten Brørup
2026-09-25 19:31 ` [PATCH v2 0/1] " Randy L Tice
2026-09-25 19:31 ` [PATCH v2 1/1] " Randy L Tice
2026-09-26 16:51 ` Stephen Hemminger
2026-09-28 14:45 ` Randy Tice (rtice)
2026-09-28 18:16 ` [PATCH v3 0/1] mbuf: add optional no-copy dynamic field storage Randy L Tice
2026-09-28 18:16 ` [PATCH v3 1/1] " Randy L Tice
2026-09-29 7:15 ` Morten Brørup [this message]
2026-09-29 11:59 ` Konstantin Ananyev
2026-09-29 12:44 ` Morten Brørup
2026-09-29 13:12 ` Konstantin Ananyev
2026-09-29 13:34 ` Morten Brørup
2026-09-29 14:14 ` Konstantin Ananyev
2026-09-29 14:44 ` Randy Tice (rtice)
2026-09-29 15:20 ` Morten Brørup
2026-09-29 19:03 ` Randy Tice (rtice)
2026-09-29 19:28 ` Konstantin Ananyev
2026-09-29 19:26 ` Konstantin Ananyev
2026-10-06 15:54 ` [PATCH v4 0/1] mbuf: add runtime metadata dynamic-field storage Randy L Tice
2026-10-06 15:54 ` [PATCH v4 1/1] " Randy L Tice
2026-10-06 16:51 ` [PATCH v4 0/1] " Stephen Hemminger
2026-10-08 16:15 ` 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=98CBD80474FA8B44BF855DF32C47DC35F65A85@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=hkalra@marvell.com \
--cc=rtice@cisco.com \
--cc=stephen@networkplumber.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