From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 8A714A04DD;
	Mon, 26 Oct 2020 23:25:20 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 7AFF95958;
	Mon, 26 Oct 2020 23:21:08 +0100 (CET)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com
 [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id B4B6A4C97
 for <dev@dpdk.org>; Mon, 26 Oct 2020 23:20:56 +0100 (CET)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 62CEB5C00DA;
 Mon, 26 Oct 2020 18:20:55 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Mon, 26 Oct 2020 18:20:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding; s=fm2; bh=I51xx7LZrN7pC
 A5ICPeW4Ghz81RXu1CKz3JMTdSTjag=; b=T9dCZmtkzjlUAk3T2P+NDavWWJCr2
 sjKytMNV/QT1meiYtLUUJ+DJfxZ8BF4DMUji7MoJG2gwfiQm+thTYs6OFQfYVrtp
 Alybe7yAF2tGDdQmuW0JLkQGlkLXxQHgJRmoiiTBFy7XvfU35IvTbo9kjaQ7WDaQ
 NMtDmnRdxHhVJQj3gY/4JFFyDwREzok4VsO/GQjFg231VgyafE31jthKJp5gQkzO
 i+DRVk1Guq810tg5XUNwqEjYGQ1yhaGenBTJkxYCOv/hba86kU3IU8ycXLD5QLb2
 v55ghdxgB2FqRKIre7wL1MsTL04U3dTDuNRgfzYpMwi78MmprHfZOSDTg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:date:from
 :in-reply-to:message-id:mime-version:references:subject:to
 :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm1; bh=I51xx7LZrN7pCA5ICPeW4Ghz81RXu1CKz3JMTdSTjag=; b=jWpsHcHy
 rZypF/Sh5CVlBgdvngnCrak2znmFtW2Acw0HxwGk1MBoi9sJb95LWgrssYNf725g
 1waRKu+bRIgXlyULY76TMxj+Ev2eUuIIyMX1zs9MlHfUo0fqT7fhYWUfCmFzBNgM
 L7WSPTK7lqVyCGNuL8gdZ5PntJ24+f/fF790j7Ua5R4+jSJZon5KtdxgpIRCxd0E
 2wKHvJSdNhm6NfobAFTopvRIIn2RQ696ITPRYm1HESHOUOV7zuYD3nELJjRP/bWo
 Bs6r61gY8K0WHqTM+TBokko15OhvjCLF/28zfON+CNRfCWOxJSHvsLeJBYKtojEs
 cxDx+ya4pS4dMA==
X-ME-Sender: <xms:x0uXXxCilhManU1dZl5Iz9AJECiJnmbnYL2y69uuHtgjfemI3ukk8w>
 <xme:x0uXX_h8cztD5MfQULboIyP2fn7Q12_cbi14H-v3XWCcUhhc2vQjQ8RQ6da2DHXMo
 rrJ_Zl90Oe2dq7ExQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkeejgdduvdegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr
 shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg
 ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg
 uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf
 hiiigvpeduvdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr
 lhhonhdrnhgvth
X-ME-Proxy: <xmx:x0uXX8ldc05On5zRl7e8RaXMP3S9TSHZgcao7mDoK8VaPZmqYreOyA>
 <xmx:x0uXX7zwkBVwMMQ4yUqR7w-PIDVF-Qu4nrLvnrVC4pXvpZitd7tg8A>
 <xmx:x0uXX2Qsk5iAf3iSMKnKOLn9uAR2YXxBm2n9Q24enMND5i3eeh8w3A>
 <xmx:x0uXX1GrMEE1lJ8gI09JpksKXbw0BTWCbd2D2g43wiO0wJUHyYSgpw>
Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 4F27C3064610;
 Mon, 26 Oct 2020 18:20:54 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, david.marchand@redhat.com,
 bruce.richardson@intel.com, olivier.matz@6wind.com,
 andrew.rybchenko@oktetlabs.ru, akhil.goyal@nxp.com,
 Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>
Date: Mon, 26 Oct 2020 23:20:13 +0100
Message-Id: <20201026222013.2147904-16-thomas@monjalon.net>
X-Mailer: git-send-email 2.28.0
In-Reply-To: <20201026222013.2147904-1-thomas@monjalon.net>
References: <20201026052105.1561859-1-thomas@monjalon.net>
 <20201026222013.2147904-1-thomas@monjalon.net>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH v2 15/15] mbuf: remove userdata field
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 2e082499b8..0f6f1df12a 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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,
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index d8ac359e51..3cec526b6a 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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.
 
diff --git a/lib/librte_kni/rte_kni_common.h b/lib/librte_kni/rte_kni_common.h
index 21b477f0aa..0db45e6a24 100644
--- a/lib/librte_kni/rte_kni_common.h
+++ b/lib/librte_kni/rte_kni_common.h
@@ -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. */
 };
 
diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index 065d87d28a..a65eaaf692 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -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;
 
 /**
-- 
2.28.0