All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: konstantin.ananyev@intel.com, david.marchand@redhat.com,
	honnappa.nagarahalli@arm.com, nd@arm.com,
	Phil Yang <phil.yang@arm.com>,
	Ruifeng wang <ruifeng.wang@arm.com>, Ray Kinsella <mdr@ashroe.eu>,
	Neil Horman <nhorman@tuxdriver.com>,
	John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	Olivier Matz <olivier.matz@6wind.com>
Subject: [dpdk-dev] [PATCH v2] mbuf: remove atomic reference counters
Date: Mon, 14 Sep 2020 14:19:48 +0200	[thread overview]
Message-ID: <20200914121948.94059-1-thomas@monjalon.net> (raw)

From: Phil Yang <phil.yang@arm.com>

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

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng wang <ruifeng.wang@arm.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v2:
    - squashed
    - removed deprecation notice
    - updated release notes (in API section)
---
 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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 88d7d07613..52168f7751 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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.
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 667e3d54ad..b729bdf200 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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()``,
diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index 8cd7137ac5..cee3d5aff5 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -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. */
-- 
2.28.0


             reply	other threads:[~2020-09-14 12:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14 12:19 Thomas Monjalon [this message]
2020-09-14 12:22 ` [dpdk-dev] [PATCH v2] mbuf: remove atomic reference counters Andrew Rybchenko
2020-09-14 12:24   ` Thomas Monjalon

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=20200914121948.94059-1-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=john.mcnamara@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=mdr@ashroe.eu \
    --cc=nd@arm.com \
    --cc=nhorman@tuxdriver.com \
    --cc=olivier.matz@6wind.com \
    --cc=phil.yang@arm.com \
    --cc=ruifeng.wang@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.