From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CD949A0353; Mon, 11 Nov 2019 08:27:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CEB3A2142; Mon, 11 Nov 2019 08:27:10 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id F1D99237 for ; Mon, 11 Nov 2019 08:27:08 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 407C721A7B; Mon, 11 Nov 2019 02:27:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 11 Nov 2019 02:27:08 -0500 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=mesmtp; bh=wUQ20aMh6Y nLw3tyyXM9eh4Zf2RsxP8QgtCjPxMvCLI=; b=R8ECpAmeWlG0eUe+w5gnE1+oZW R8EC68Jk0meB2YjZ6mru8en/yQw3mEYG+u9AChgCfAVknc5C77/z16WszPIILOyh hp6GIVr4qBbOsfyhbLpSWIE2g/czGGZ9WH9FdbXO8wEbpO/mpIs6a+E6Gsixx890 AG9/sMeBpdynmM1s4= 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=wUQ20aMh6YnLw3tyyXM9eh4Zf2RsxP8QgtCjPxMvCLI=; b=Insho1VC SbUYfcNoJqbbNSrHz8r8llxJqUdcz2qjBiud8YkeTUHk9ZxzU4NGddfjnxj7U9gs +fI/BKg6beOt+fxA9bCOxNoN3JMwaYoj2Audeq/gboSoOVubcW08bgnlEmJaxzAx tWjxlNspHORcHdP9Ix1VcdS2B9quINvyxpRcv1dPS9+meY9x313RisyanNA7pdZs Lon1SsyvgJNuJUZBPf9PjPq5byhVF6sSn8NArEbpm4BstcSPKz6kn3uJTItljval vA3EV/dqK71ipRIW2R82QGvEtqZ5IhvHtl0SrF2SS3k1F4EZbF8JmdJ8AHS7G555 xNAUJfGoC9YQNA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddviedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc fkphepfeejrddujeefrdegjedrudefieenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.monjalon.net (unknown [37.173.47.136]) by mail.messagingengine.com (Postfix) with ESMTPA id CBE4F80059; Mon, 11 Nov 2019 02:27:04 -0500 (EST) From: Thomas Monjalon To: Ferruh Yigit , Andrew Rybchenko Cc: dev@dpdk.org Date: Mon, 11 Nov 2019 08:26:09 +0100 Message-Id: <20191111072609.6649-1-thomas@monjalon.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191107221524.23205-1-thomas@monjalon.net> References: <20191107221524.23205-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In order to allow smooth addition of features without breaking ABI compatibility, some space is reserved in several core structs of ethdev API. 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. Signed-off-by: Thomas Monjalon --- v2: padding more struct (config and get_info) Note: previous acks are not kept in order to request an explicit review of these new changes. --- lib/librte_ethdev/rte_ethdev.h | 15 +++++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 44d77b332e..4ba01905c5 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -402,6 +402,9 @@ struct rte_eth_rxmode { * structure are allowed to be set. */ uint64_t offloads; + + uint64_t reserved_64s[2]; /**< Reserved for future fields */ + void *reserved_ptrs[2]; /**< Reserved for future fields */ }; /** @@ -802,6 +805,9 @@ struct rte_eth_txmode { /**< If set, reject sending out untagged pkts */ hw_vlan_insert_pvid : 1; /**< If set, enable port based VLAN insertion */ + + uint64_t reserved_64s[2]; /**< Reserved for future fields */ + void *reserved_ptrs[2]; /**< Reserved for future fields */ }; /** @@ -818,6 +824,9 @@ struct rte_eth_rxconf { * fields on rte_eth_dev_info structure are allowed to be set. */ uint64_t offloads; + + uint64_t reserved_64s[2]; /**< Reserved for future fields */ + void *reserved_ptrs[2]; /**< Reserved for future fields */ }; /** @@ -836,6 +845,9 @@ struct rte_eth_txconf { * fields on rte_eth_dev_info structure are allowed to be set. */ uint64_t offloads; + + uint64_t reserved_64s[2]; /**< Reserved for future fields */ + void *reserved_ptrs[2]; /**< Reserved for future fields */ }; /** @@ -1260,6 +1272,9 @@ struct rte_eth_dev_info { * embedded managed interconnect/switch. */ struct rte_eth_switch_info switch_info; + + uint64_t reserved_64s[2]; /**< Reserved for future fields */ + void *reserved_ptrs[2]; /**< Reserved for future fields */ }; /** diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h index f215af7c94..4d52be6121 100644 --- a/lib/librte_ethdev/rte_ethdev_core.h +++ b/lib/librte_ethdev/rte_ethdev_core.h @@ -785,6 +785,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; @@ -851,6 +854,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