From patchwork Mon Sep 14 12:19:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 77602 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 07A46A04B1; Mon, 14 Sep 2020 14:20:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 80A03FFA; Mon, 14 Sep 2020 14:20:08 +0200 (CEST) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by dpdk.org (Postfix) with ESMTP id AABD8E07 for ; Mon, 14 Sep 2020 14:20:07 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 082B658014F; Mon, 14 Sep 2020 08:20:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 14 Sep 2020 08:20:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=2sv5dsRht+Du8MO89A8rmy6dVP MtPf3WMRxjIcY71kA=; b=amQaskJ9eFu2riJgFsnto90Nml3VivR67Dtfcam56q b8VpB/o3JrUDBpJ/am8AE6MDeiB2LqPiL4HMZZI0/IwAChTNVpEwJaGWs9xS6Sj1 qkwX7G5MbcJdz97PEMqXoTNz1UBtdArLAHnVMbRFWpoQYAHCZlFnRGVdX0Yv1G4R cHE9lLcZSUZruB9TgluZDZNBbPRYFfuA1eG9uJSzJafhssOfMcopr90FYszodXve tRSXYjayPDdNzGJ2I3MNoO3jA/Lc6z4NarUXocthiBiaWLqyIBxqWoq/gC16JC1c iRWPzWOEoIatYILw1ifQoh2Wn4Qg4efPoJ6XB2AuzyAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=2sv5dsRht+Du8MO89 A8rmy6dVPMtPf3WMRxjIcY71kA=; b=db2O2uWoOs5bmUQLSjk5vQB3J/AF0WrFj LIKEbVETPwxF4JQXcqdKtHf0lS1j9R7f2dRIT2WXcA4Z/aaipFeSgktg2PNzbJQl PvOQmeMqwhZoaH+yctampLdr/9aT1xU4XCpMAXUJInG0gLanh1paOrlUCsa5yp6b WlcDZjibrQwU4UsI8EtirwtJIMLAsSKIHcXbStwsm+FLIV4wJRMO6QCgJ8GZnRuM 6pvqkmh8dkDUZn0KiAsgjsCc1RP5YbkeP2bbxC9EBnqh59+JHgwa8pDQ+Msw7kO0 xUDelRlbRxtuNRHcDTueOsvXAiYH8u9OdZeacTLkVBrdqgcoVJJVA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudeiiedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgrshcu ofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrf grthhtvghrnhepvdelvdduhedvudduveeuvdevheegudelgeeigfejheduhedttdegudff jeeihffgnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhn rdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4C2463280063; Mon, 14 Sep 2020 08:20:04 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: konstantin.ananyev@intel.com, david.marchand@redhat.com, honnappa.nagarahalli@arm.com, nd@arm.com, Phil Yang , Ruifeng wang , Ray Kinsella , Neil Horman , John McNamara , Marko Kovacevic , Olivier Matz Date: Mon, 14 Sep 2020 14:19:48 +0200 Message-Id: <20200914121948.94059-1-thomas@monjalon.net> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2] mbuf: remove atomic reference counters X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Phil Yang Remove the deprecated refcnt_atomic union fields in rte_mbuf and rte_mbuf_ext_shared_info structures. Signed-off-by: Phil Yang Reviewed-by: Ruifeng wang Signed-off-by: Thomas Monjalon Acked-by: Andrew Rybchenko --- 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. */