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 70633A04AD;
	Thu,  7 Nov 2019 23:16:09 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 82E361BF95;
	Thu,  7 Nov 2019 23:16:08 +0100 (CET)
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
 [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 2AC7D1BF5A
 for <dev@dpdk.org>; Thu,  7 Nov 2019 23:16:07 +0100 (CET)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.west.internal (Postfix) with ESMTP id AF2B7406;
 Thu,  7 Nov 2019 17:16:05 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Thu, 07 Nov 2019 17:16:06 -0500
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=mesmtp; bh=NAGxo7zkwrKeVgOlLiNw4v2
 sUctVWXuFFpiNt04wsBo=; b=DhBuzReHKJpoHSAmXDnN+zXB45FvvvwjhHnSkdl
 Jg0xTNzBmZ5aZg8Qt81siva4ur9delduYZi/3LNhy1RP7lJUnOtExuw3JH0CIyzo
 Ht6xHbYGyqL8xomZPRBmUEw97Ezucfh2WfAdhDx0uxM0NZAGAyzCDGKz5zX9fmpH
 KZmU=
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=fm1; bh=NAGxo7zkwrKeVgOlL
 iNw4v2sUctVWXuFFpiNt04wsBo=; b=wgv2r+Bq8LbLOn9CKKXZo0G1OTjCgq1jZ
 ppqFuNzfM2b74q6c7I1bmx//nP8V/lbrrCo2e2Xo8p/xUyg9diNpjYNlhi0SQi9+
 N1gYgGOInilVNU1vkuEBFcOt7NJkrpAmCIz1BnRtRcrzF2AcPkqbHNpB3OQAg2FM
 smZmoWn3nL9bXtX8nDJQioxUdGD42VU96g5Xx2oRYxMvgAc/c9LeyyqsZWOYWhza
 OdcvYm9UNb+pRt8liHhln6wP+1QRFT/ZZ3vay7G1xgUEpQ+9CCuhH/OonPlYjao5
 J4zgcLF4oFuCuW5x3/i7hY1vX9JVulZ8mituRD/qM6/YY35608xfA==
X-ME-Sender: <xms:pJfEXbQIhqANkWubJ6GLkmgETMKLU1CmMcJGnzLn3zO9G0c9CiaWOA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudduledgudeitdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs
 ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph
 epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho
 mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd
X-ME-Proxy: <xmx:pJfEXZFZfqQ3PDfGgbTDCwyPZXv2le04zBrtdtB0qatPqqGLaZKIRg>
 <xmx:pJfEXTly7-wCWDzXyCXN_gjqTimmcJRyDjXaWthb4jBq0IDXTDmB2g>
 <xmx:pJfEXc13spUp9724GllHssh13ItXinIHqEXTPKvDy3MFP7mqcevGwA>
 <xmx:pZfEXWzMhzb6pNo3lDIMS9HGIRoivqQsExdw0cRgyXEwzbYPTlsEow>
Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id BBFCA8005C;
 Thu,  7 Nov 2019 17:16:03 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
 Andrew Rybchenko <arybchenko@solarflare.com>
Cc: dev@dpdk.org
Date: Thu,  7 Nov 2019 23:15:24 +0100
Message-Id: <20191107221524.23205-1-thomas@monjalon.net>
X-Mailer: git-send-email 2.23.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH] ethdev: reserve space in main structs for
	extension
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>

The struct rte_eth_dev and rte_eth_dev_data are supposed
to be used internally only, but there is a chance that
increasing their size would break ABI for some applications.
In order to allow smooth addition of features without breaking
ABI compatibility, some space is reserved.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_ethdev/rte_ethdev_core.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 392aea8e6b..ea8dd1d9ba 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -698,6 +698,9 @@ struct rte_eth_dev {
 	struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
 	enum rte_eth_dev_state state; /**< Flag indicating the port state */
 	void *security_ctx; /**< Context for security ops */
+
+	uint64_t reserved_64s[4]; /**< Reserved for future fields */
+	void *reserved_ptrs[4]; /**< Reserved for future fields */
 } __rte_cache_aligned;
 
 struct rte_eth_dev_sriov;
@@ -764,6 +767,9 @@ struct rte_eth_dev_data {
 			/**< Switch-specific identifier.
 			 *   Valid if RTE_ETH_DEV_REPRESENTOR in dev_flags.
 			 */
+
+	uint64_t reserved_64s[4]; /**< Reserved for future fields */
+	void *reserved_ptrs[4]; /**< Reserved for future fields */
 } __rte_cache_aligned;
 
 /**
-- 
2.23.0