[v2,15/15] mbuf: remove userdata field
Checks
Commit Message
As announced in the deprecation note, the field userdata / udata64
is removed to give more space to the dynamic fields.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
doc/guides/rel_notes/deprecation.rst | 1 -
doc/guides/rel_notes/release_20_11.rst | 3 +++
lib/librte_kni/rte_kni_common.h | 3 +--
lib/librte_mbuf/rte_mbuf_core.h | 8 +-------
4 files changed, 5 insertions(+), 10 deletions(-)
Comments
On Mon, Oct 26, 2020 at 11:20:13PM +0100, Thomas Monjalon wrote:
> As announced in the deprecation note, the field userdata / udata64
> is removed to give more space to the dynamic fields.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
@@ -87,7 +87,6 @@ Deprecation Notices
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,
@@ -426,6 +426,9 @@ API Changes
the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
The field ``refcnt`` is remaining from the old unions.
+* mbuf: Removed the unioned fields ``userdata`` and ``udata64``
+ from the structure ``rte_mbuf``. It is replaced with dynamic fields.
+
* pci: Removed the ``rte_kernel_driver`` enum defined in rte_dev.h and
replaced with a private enum in the PCI subsystem.
@@ -86,8 +86,7 @@ struct rte_kni_mbuf {
uint16_t data_len; /**< Amount of data in segment buffer. */
/* fields on second cache line */
- char pad3[8] __attribute__((__aligned__(RTE_CACHE_LINE_MIN_SIZE)));
- void *pool;
+ void *pool __attribute__((__aligned__(RTE_CACHE_LINE_MIN_SIZE)));
void *next; /**< Physical address of next mbuf in kernel. */
};
@@ -599,12 +599,6 @@ struct rte_mbuf {
/* second cache line - fields only used in slow path or on TX */
RTE_MARKER cacheline1 __rte_cache_min_aligned;
- RTE_STD_C11
- union {
- void *userdata; /**< Can be used for external metadata */
- uint64_t udata64; /**< Allow 8-byte userdata on 32-bit */
- };
-
struct rte_mempool *pool; /**< Pool from which mbuf was allocated. */
struct rte_mbuf *next; /**< Next segment of scattered packet. */
@@ -662,7 +656,7 @@ struct rte_mbuf {
*/
struct rte_mbuf_ext_shared_info *shinfo;
- uint64_t dynfield1[2]; /**< Reserved for dynamic fields. */
+ uint64_t dynfield1[3]; /**< Reserved for dynamic fields. */
} __rte_cache_aligned;
/**