Skip to contentSkip to conversation

doc: add link to mbuf layout history

PATCH In review Thomas Monjalon 2 participants 4 messages Apr 7 – May 11

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: add link to mbuf layout history

In order to illustrate how mbuf is kept small,
add a link to a page showing the mbuf layout for each version.

---
 doc/guides/prog_guide/mbuf_lib.rst | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
doc/guides/prog_guide/mbuf_lib.rst +6 -5
index 382bfbdca4..97f8e72356 100644
@@ -8,11 +8,12 @@ The Packet (MBuf) library provides the ability to allocate and free buffers (mbu
 that may be used by the DPDK application to store message buffers.
 The message buffers are stored in a mempool, using the :doc:`mempool_lib`.
 
-A rte_mbuf struct generally carries network packet buffers, but it can actually
-be any data (control data, events, ...).
-The rte_mbuf header structure is kept as small as possible and currently uses
-just two cache lines, with the most frequently used fields being on the first
-of the two cache lines.
+A ``struct rte_mbuf`` generally carries network packet buffers,
+but it can actually be any data (control data, events, etc).
+The ``rte_mbuf`` header structure is
+`kept as small as possible <https://doc.dpdk.org/struct/mbuf/history.html>`_
+and currently uses just two 64-byte cache lines,
+with the most frequently used fields being on the first of the two cache lines.
 
 Design of Packet Buffers
 ------------------------
Signature · 1 line
2.53.0
Acked-by on v1 1/1
#1 lore raw
Quoted 39 lines

From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, 7 April 2026 10.06

In order to illustrate how mbuf is kept small,
add a link to a page showing the mbuf layout for each version.

---
 doc/guides/prog_guide/mbuf_lib.rst | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
doc/guides/prog_guide/mbuf_lib.rst +0 -0
index 382bfbdca4..97f8e72356 100644
@@ -8,11 +8,12 @@ The Packet (MBuf) library provides the ability to

allocate and free buffers (mbu
that may be used by the DPDK application to store message buffers. The message buffers are stored in a mempool, using the
:doc:mempool_lib.

-A rte_mbuf struct generally carries network packet buffers, but it can actually

doc/guides/prog_guide/mbuf_lib.rst +0 -2
-be any data (control data, events, ...).
-The rte_mbuf header structure is kept as small as possible and

currently uses
-just two cache lines, with the most frequently used fields being on the first

doc/guides/prog_guide/mbuf_lib.rst +4 -1
-of the two cache lines.
+A ``struct rte_mbuf`` generally carries network packet buffers,
+but it can actually be any data (control data, events, etc).
+The ``rte_mbuf`` header structure is
+`kept as small as possible

<https://doc.dpdk.org/struct/mbuf/history.html>`_

doc/guides/prog_guide/mbuf_lib.rst +2 -0
+and currently uses just two 64-byte cache lines,
+with the most frequently used fields being on the first of the two

cache lines.

Quoted 4 lines

Design of Packet Buffers
------------------------
--
2.53.0

Hadn't noticed that illustration before, so good idea linking to it here.

#2 lore raw

07/04/2026 10:44, Morten Brørup:

Quoted 4 lines
Quoted 4 lines

From: Thomas Monjalon [mailto:[email protected]] In order to illustrate how mbuf is kept small,
add a link to a page showing the mbuf layout for each version.

[...]

Quoted 1 line

Hadn't noticed that illustration before, so good idea linking to it here.

You didn't notice because it's a new page.
Thanks easter week-end :-)

author Applied
#3 lore raw
In reply to Morten Brørup

07/04/2026 10:44, Morten Brørup:

Quoted 39 lines
Quoted 39 lines

From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, 7 April 2026 10.06

In order to illustrate how mbuf is kept small,
add a link to a page showing the mbuf layout for each version.

---
 doc/guides/prog_guide/mbuf_lib.rst | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
doc/guides/prog_guide/mbuf_lib.rst +0 -0
index 382bfbdca4..97f8e72356 100644
@@ -8,11 +8,12 @@ The Packet (MBuf) library provides the ability to

allocate and free buffers (mbu
that may be used by the DPDK application to store message buffers. The message buffers are stored in a mempool, using the
:doc:mempool_lib.

-A rte_mbuf struct generally carries network packet buffers, but it can actually

doc/guides/prog_guide/mbuf_lib.rst +0 -2
-be any data (control data, events, ...).
-The rte_mbuf header structure is kept as small as possible and

currently uses
-just two cache lines, with the most frequently used fields being on the first

doc/guides/prog_guide/mbuf_lib.rst +4 -1
-of the two cache lines.
+A ``struct rte_mbuf`` generally carries network packet buffers,
+but it can actually be any data (control data, events, etc).
+The ``rte_mbuf`` header structure is
+`kept as small as possible

<https://doc.dpdk.org/struct/mbuf/history.html>`_

doc/guides/prog_guide/mbuf_lib.rst +2 -0
+and currently uses just two 64-byte cache lines,
+with the most frequently used fields being on the first of the two

cache lines.

Quoted 8 lines
Quoted 4 lines

Design of Packet Buffers
------------------------
--
2.53.0

Hadn't noticed that illustration before, so good idea linking to it here.

Applied