eventdev: reserve space in main structs for extension

Message ID 20191108165603.3652-1-jerinj@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series eventdev: reserve space in main structs for extension |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot warning Travis build: failed
ci/Intel-compilation fail Compilation issues

Commit Message

Jerin Jacob Kollanukkaran Nov. 8, 2019, 4:56 p.m. UTC
  From: Jerin Jacob <jerinj@marvell.com>

The struct rte_eventdev and rte_eventdev_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: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eventdev/rte_eventdev.h | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Thomas Monjalon Nov. 12, 2019, 2:58 a.m. UTC | #1
08/11/2019 17:56, jerinj@marvell.com:
> From: Jerin Jacob <jerinj@marvell.com>
> 
> The struct rte_eventdev and rte_eventdev_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: Jerin Jacob <jerinj@marvell.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index ced6f29d9..bc8952576 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -1282,6 +1282,8 @@  struct rte_eventdev_data {
 
 	char name[RTE_EVENTDEV_NAME_MAX_LEN];
 	/**< Unique identifier name */
+	uint64_t reserved_64s[4]; /**< Reserved for future fields */
+	void *reserved_ptrs[4]; /**< Reserved for future fields */
 } __rte_cache_aligned;
 
 /** @internal The data structure associated with each event device. */
@@ -1314,6 +1316,9 @@  struct rte_eventdev {
 	RTE_STD_C11
 	uint8_t attached : 1;
 	/**< Flag indicating the device is attached */
+
+	uint64_t reserved_64s[4]; /**< Reserved for future fields */
+	void *reserved_ptrs[4]; /**< Reserved for future fields */
 } __rte_cache_aligned;
 
 extern struct rte_eventdev *rte_eventdevs;