summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2019-11-11 08:26:09 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-11 17:02:29 +0100
commit436b3a6b6e6241348f1ec7b6f81af831ebb582eb (patch)
tree4ad29dfab45be313238cc2fe247a1d4e31c66d08
parent0d1d73170820aa2248d467628ef39f813c5189bb (diff)
downloaddpdk-436b3a6b6e6241348f1ec7b6f81af831ebb582eb.zip
dpdk-436b3a6b6e6241348f1ec7b6f81af831ebb582eb.tar.gz
dpdk-436b3a6b6e6241348f1ec7b6f81af831ebb582eb.tar.xz
ethdev: reserve space in main structs for extension
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 <thomas@monjalon.net> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
-rw-r--r--lib/librte_ethdev/rte_ethdev.h15
-rw-r--r--lib/librte_ethdev/rte_ethdev_core.h6
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 9b1a8e9..fbfb309 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 */
};
/**
@@ -1261,6 +1273,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 9588fe7..7bf97e2 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -802,6 +802,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;
@@ -868,6 +871,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;
/**