From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B99FC5DF60 for ; Thu, 7 Nov 2019 22:16:10 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 72D742075C for ; Thu, 7 Nov 2019 22:16:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="DhBuzReH"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="wgv2r+Bq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72D742075C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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 ; 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: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudduledgudeitdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd 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 BBFCA8005C; Thu, 7 Nov 2019 17:16:03 -0500 (EST) From: Thomas Monjalon To: Ferruh Yigit , Andrew Rybchenko 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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