Skip to contentSkip to conversation

remove mbuf deprecated filed

PATCH In review Phil Yang 3 participants 9 messages Sep 11, 2020 – Sep 14, 2020

lore
Share & tools
lore

Phil Yang

author
#0 lore raw

cover remove mbuf deprecated filed

Remove the deprecated[1] refcnt_atomic member in structures rte_mbuf and rte_mbuf_ext_shared_info.

[1] http://code.dpdk.org/dpdk/latest/source/doc/guides/rel_notes/deprecation.rst#L161

Phil Yang (2):
mbuf: remove generic mbuf atomically accessed refcnt
mbuf: remove external buffer atomically accessed refcnt

 doc/guides/rel_notes/release_20_11.rst |  2 ++
 lib/librte_mbuf/rte_mbuf_core.h        | 13 ++-----------
 2 files changed, 4 insertions(+), 11 deletions(-)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/2 mbuf: remove generic mbuf atomically accessed refcnt

Remove the deprecated refcnt_atomic union fields in rte_mbuf structure.

---
 doc/guides/rel_notes/release_20_11.rst | 2 ++
 lib/librte_mbuf/rte_mbuf_core.h        | 7 +------
 2 files changed, 3 insertions(+), 6 deletions(-)
doc/guides/rel_notes/release_20_11.rst +2 -0
index df227a1..6eeeffc 100644
@@ -100,6 +100,8 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* mbuf: The field ``refcnt_atomic`` has been removed from structure
+  ``rte_mbuf``.
 
 Known Issues
 ------------
lib/librte_mbuf/rte_mbuf_core.h +1 -6
index 8cd7137..71fd6f5 100644
@@ -495,12 +495,7 @@ struct rte_mbuf {
 	 * or non-atomic) is controlled by the CONFIG_RTE_MBUF_REFCNT_ATOMIC
 	 * config option.
 	 */
-	RTE_STD_C11
-	union {
-		rte_atomic16_t refcnt_atomic; /**< Atomically accessed refcnt */
-		/** Non-atomically accessed refcnt */
-		uint16_t refcnt;
-	};
+	uint16_t refcnt;
 	uint16_t nb_segs;         /**< Number of segments. */
 
 	/** Input port (16 bits to support more than 256 virtual ports).
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 2/2 mbuf: remove external buffer atomically accessed refcnt

In reply to Phil Yang

Remove the deprecated refcnt_atomic union fields in rte_mbuf_ext_shared_info structure.

---
 doc/guides/rel_notes/release_20_11.rst | 4 ++--
 lib/librte_mbuf/rte_mbuf_core.h        | 6 +-----
 2 files changed, 3 insertions(+), 7 deletions(-)
doc/guides/rel_notes/release_20_11.rst +2 -2
index 6eeeffc..6c90d75 100644
@@ -100,8 +100,8 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
-* mbuf: The field ``refcnt_atomic`` has been removed from structure
-  ``rte_mbuf``.
+* mbuf: The field ``refcnt_atomic`` has been removed from structures
+  ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
 
 Known Issues
 ------------
lib/librte_mbuf/rte_mbuf_core.h +1 -5
index 71fd6f5..cee3d5a 100644
@@ -674,11 +674,7 @@ typedef void (*rte_mbuf_extbuf_free_callback_t)(void *addr, void *opaque);
 struct rte_mbuf_ext_shared_info {
 	rte_mbuf_extbuf_free_callback_t free_cb; /**< Free callback function */
 	void *fcb_opaque;                        /**< Free callback argument */
-	RTE_STD_C11
-	union {
-		rte_atomic16_t refcnt_atomic; /**< Atomically accessed refcnt */
-		uint16_t refcnt;
-	};
+	uint16_t refcnt;
 };
 
 /**< Maximum number of nb_segs allowed. */
Signature · 1 line
2.7.4
#5 lore raw

11/09/2020 12:57, Phil Yang:

Quoted 8 lines

Andrew Rybchenko <[email protected]> writes:

<snip>

Quoted 5 lines · Phil Yang
Quoted 1 line

Remove the deprecated[1] refcnt_atomic member in structures rte_mbuf

and

Quoted 2 lines

rte_mbuf_ext_shared_info.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

[1]

http://code.dpdk.org/dpdk/latest/source/doc/guides/rel_notes/deprecatio
n.rst#L161

LGTM, please, cleanup deprecation notice in this patches when corresponding changes are done.

OK. Will do.

I will do it while squashing and merging the patches.

#6 lore raw

PATCH v3 1/1 mbuf: remove atomic reference counters

In reply to Phil Yang

From: Phil Yang <[email protected]>

Remove the deprecated refcnt_atomic union fields in rte_mbuf and rte_mbuf_ext_shared_info structures.

---
v2:
- squashed
- removed deprecation notice
- updated release notes (in API section)
v3:
- re-sent with --in-reply-to
- added Andrew's ack

---
 doc/guides/rel_notes/deprecation.rst   |  8 +-------
 doc/guides/rel_notes/release_20_11.rst |  4 ++++
 lib/librte_mbuf/rte_mbuf_core.h        | 13 ++-----------
 3 files changed, 7 insertions(+), 18 deletions(-)
doc/guides/rel_notes/deprecation.rst +1 -7
index 88d7d07613..52168f7751 100644
@@ -148,13 +148,7 @@ Deprecation Notices
   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.
+  The deprecated unioned field ``buf_physaddr`` will be removed 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.
doc/guides/rel_notes/release_20_11.rst +4 -0
index 667e3d54ad..b729bdf200 100644
@@ -84,6 +84,10 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* mbuf: Removed the unioned field ``refcnt_atomic`` from
+  the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
+  The field ``refcnt`` is remaining from the old unions.
+
 * rawdev: Added a structure size parameter to the functions
   ``rte_rawdev_queue_setup()``, ``rte_rawdev_queue_conf_get()``,
   ``rte_rawdev_info_get()`` and ``rte_rawdev_configure()``,
lib/librte_mbuf/rte_mbuf_core.h +2 -11
index 8cd7137ac5..cee3d5aff5 100644
@@ -495,12 +495,7 @@ struct rte_mbuf {
 	 * or non-atomic) is controlled by the CONFIG_RTE_MBUF_REFCNT_ATOMIC
 	 * config option.
 	 */
-	RTE_STD_C11
-	union {
-		rte_atomic16_t refcnt_atomic; /**< Atomically accessed refcnt */
-		/** Non-atomically accessed refcnt */
-		uint16_t refcnt;
-	};
+	uint16_t refcnt;
 	uint16_t nb_segs;         /**< Number of segments. */
 
 	/** Input port (16 bits to support more than 256 virtual ports).
@@ -679,11 +674,7 @@ typedef void (*rte_mbuf_extbuf_free_callback_t)(void *addr, void *opaque);
 struct rte_mbuf_ext_shared_info {
 	rte_mbuf_extbuf_free_callback_t free_cb; /**< Free callback function */
 	void *fcb_opaque;                        /**< Free callback argument */
-	RTE_STD_C11
-	union {
-		rte_atomic16_t refcnt_atomic; /**< Atomically accessed refcnt */
-		uint16_t refcnt;
-	};
+	uint16_t refcnt;
 };
 
 /**< Maximum number of nb_segs allowed. */
Signature · 1 line
2.28.0
#7 lore raw

Re: [dpdk-dev] [PATCH v3] mbuf: remove atomic reference counters

Quoted 10 lines · I wrote:

From: Phil Yang <[email protected]>

Remove the deprecated refcnt_atomic union fields in rte_mbuf and rte_mbuf_ext_shared_info structures.

---

Quoted 8 lines

v2:
- squashed
- removed deprecation notice
- updated release notes (in API section)

v3:
- re-sent with --in-reply-to
- added Andrew's ack

The ack is missing above,
Anyway, applied with the ack :)

author
#8 lore raw

Re: [dpdk-dev] [PATCH v3] mbuf: remove atomic reference counters

Quoted 14 lines · Thomas Monjalon
Quoted 14 lines

Remove the deprecated refcnt_atomic union fields in rte_mbuf and rte_mbuf_ext_shared_info structures.

---

v2:
- squashed
- removed deprecation notice
- updated release notes (in API section)

Quoted 6 lines
Quoted 3 lines

v3:
- re-sent with --in-reply-to
- added Andrew's ack

The ack is missing above,
Anyway, applied with the ack :)

Thank you. 😊