Skip to contentSkip to conversation

doc: announce API change in mbuf

PATCH In review Thomas Monjalon 5 participants 6 messages Jul 31, 2020 – Aug 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: announce API change in mbuf

In order to prepare for adding more features requiring more space in mbuf, some static fields must become dynamic.
Some small layout changes may have performance benefits as well.

The deprecation notice for atomic refcount is moved and reworded to fit below the layout deprecation.

---
 doc/guides/rel_notes/deprecation.rst | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)
doc/guides/rel_notes/deprecation.rst +20 -6
index ea4cfa7a48..015c386c76 100644
@@ -67,6 +67,26 @@ Deprecation Notices
   us extending existing enum/define.
   One solution can be using a fixed size array instead of ``.*MAX.*`` value.
 
+* mbuf: Some fields will be converted to dynamic API in DPDK 20.11
+  in order to reserve more space for the dynamic fields.
+  The following static fields will be moved as dynamic:
+
+  - ``timestamp``
+  - ``userdata`` / ``udata64``
+  - ``seqn``
+
+  As a consequence, the layout of the ``struct rte_mbuf`` will be re-arranged,
+  avoiding impact on vectorized implementation of the driver datapaths,
+  while evaluating performance gains of a better use of the first cache line.
+
+  The deprecated unioned fields ``buf_physaddr`` and ``refcnt_atomic``
+  (as explained below) will be removed in DPDK 20.11.
+
+* mbuf: ``refcnt_atomic`` member in structures ``rte_mbuf`` and
+  ``rte_mbuf_ext_shared_info`` is of type ``rte_atomic16_t``.
+  Due to adoption of C11 atomic builtins, the field ``refcnt_atomic``
+  will be replaced with ``refcnt`` of type ``uint16_t`` in DPDK 20.11.
+
 * ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible
   will be done in 20.11.
   Currently the ``struct eth_dev_ops`` struct is accessible by the application
@@ -132,12 +152,6 @@ Deprecation Notices
   in "rte_sched.h". These changes are aligned to improvements suggested in the
   RFC https://mails.dpdk.org/archives/dev/2018-November/120035.html.
 
-* mbuf: ``refcnt_atomic`` member in structures ``rte_mbuf`` and
-  ``rte_mbuf_ext_shared_info`` is of type ``rte_atomic16_t``. Due to adoption
-  of C11 atomic builtins it will be of type ``uint16_t``. ``refcnt_atomic``
-  will be removed in 20.11. It will be replaced with ``refcnt`` of type
-  ``uint16_t``.
-
 * metrics: The function ``rte_metrics_init`` will have a non-void return
   in order to notify errors instead of calling ``rte_exit``.
 
Signature · 1 line
2.27.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Thomas Monjalon

In order to prepare for adding more features requiring more space in mbuf, some static fields must become dynamic.
Some small layout changes may have performance benefits as well.

The deprecation notice for atomic refcount is moved and reworded to fit below the layout deprecation.

#2 lore raw
Quoted 5 lines · Olivier Matz
Quoted 4 lines · Thomas Monjalon

In order to prepare for adding more features requiring more space in mbuf, some static fields must become dynamic.
Some small layout changes may have performance benefits as well.

Quoted 7 lines
Quoted 4 lines

The deprecation notice for atomic refcount is moved and reworded to fit below the layout deprecation.

Acked-by on v1 1/1
#3 lore raw
In reply to Thomas Monjalon
Quoted 9 lines · Thomas Monjalon

In order to prepare for adding more features requiring more space in mbuf, some static fields must become dynamic.
Some small layout changes may have performance benefits as well.

The deprecation notice for atomic refcount is moved and reworded to fit below the layout deprecation.

Signature · 1 line
David Marchand
#4 lore raw
In reply to Thomas Monjalon
Quoted 24 lines · Thomas Monjalon

In order to prepare for adding more features requiring more space in mbuf, some static fields must become dynamic.
Some small layout changes may have performance benefits as well.

The deprecation notice for atomic refcount is moved and reworded to fit below the layout deprecation.

---
 doc/guides/rel_notes/deprecation.rst | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)
doc/guides/rel_notes/deprecation.rst +4 -0
index ea4cfa7a48..015c386c76 100644
@@ -67,6 +67,26 @@ Deprecation Notices
   us extending existing enum/define.
   One solution can be using a fixed size array instead of ``.*MAX.*`` value.
 
+* mbuf: Some fields will be converted to dynamic API in DPDK 20.11
+  in order to reserve more space for the dynamic fields.
+  The following static fields will be moved as dynamic:
+

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 83

Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +10 -0
+  - ``timestamp``
+  - ``userdata`` / ``udata64``
+  - ``seqn``
+
+  As a consequence, the layout of the ``struct rte_mbuf`` will be re-arranged,
+  avoiding impact on vectorized implementation of the driver datapaths,
+  while evaluating performance gains of a better use of the first cache line.
+
+  The deprecated unioned fields ``buf_physaddr`` and ``refcnt_atomic``
+  (as explained below) will be removed in DPDK 20.11.

So what does anyone using these fields do - except panic perhaps. Can we include a reference to the DPDK Userspace presentation, in advance of the documentation supporting the dynamic mbuf. To prepare people for what is to come ...

https://www.youtube.com/watch?v=Ttl6MlhmzWY

Quoted 23 lines
doc/guides/rel_notes/deprecation.rst +6 -6
+
+* mbuf: ``refcnt_atomic`` member in structures ``rte_mbuf`` and
+  ``rte_mbuf_ext_shared_info`` is of type ``rte_atomic16_t``.
+  Due to adoption of C11 atomic builtins, the field ``refcnt_atomic``
+  will be replaced with ``refcnt`` of type ``uint16_t`` in DPDK 20.11.
+
 * ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible
   will be done in 20.11.
   Currently the ``struct eth_dev_ops`` struct is accessible by the application
@@ -132,12 +152,6 @@ Deprecation Notices
   in "rte_sched.h". These changes are aligned to improvements suggested in the
   RFC https://mails.dpdk.org/archives/dev/2018-November/120035.html.
 
-* mbuf: ``refcnt_atomic`` member in structures ``rte_mbuf`` and
-  ``rte_mbuf_ext_shared_info`` is of type ``rte_atomic16_t``. Due to adoption
-  of C11 atomic builtins it will be of type ``uint16_t``. ``refcnt_atomic``
-  will be removed in 20.11. It will be replaced with ``refcnt`` of type
-  ``uint16_t``.
-
 * metrics: The function ``rte_metrics_init`` will have a non-void return
   in order to notify errors instead of calling ``rte_exit``.
 
author Applied
#5 lore raw

05/08/2020 11:28, Kinsella, Ray:

Quoted 12 lines · Thomas Monjalon
Quoted 9 lines

In order to prepare for adding more features requiring more space in mbuf, some static fields must become dynamic.
Some small layout changes may have performance benefits as well.

The deprecation notice for atomic refcount is moved and reworded to fit below the layout deprecation.

---

Quoted 6 lines

So what does anyone using these fields do - except panic perhaps. Can we include a reference to the DPDK Userspace presentation, in advance of the documentation supporting the dynamic mbuf. To prepare people for what is to come ...

https://www.youtube.com/watch?v=Ttl6MlhmzWY

Good idea, link added.

Applied