From 888683110dc766b6907d2686c912e5189e3312ab Mon Sep 17 00:00:00 2001 From: Ciara Power Date: Tue, 18 Feb 2020 13:39:44 +0000 Subject: [PATCH] ethdev: add comment to warn of ABI breakage If a function is added to the eth_dev_ops struct before tx_descriptor_status function, this will cause ABI breakage. This is due to static inline functions using this function, and some other functions above it in the struct, so they cannot change position. A comment is added to inform developers of this possible breakage. Signed-off-by: Ciara Power Reviewed-by: Ferruh Yigit Reviewed-by: Andrew Rybchenko Acked-by: Thomas Monjalon --- lib/librte_ethdev/rte_ethdev_core.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h index 7bf97e24ed..32407dd418 100644 --- a/lib/librte_ethdev/rte_ethdev_core.h +++ b/lib/librte_ethdev/rte_ethdev_core.h @@ -667,6 +667,10 @@ struct eth_dev_ops { /**< Check the status of a Rx descriptor. */ eth_tx_descriptor_status_t tx_descriptor_status; /**< Check the status of a Tx descriptor. */ + /* + * Static inline functions use functions ABOVE this comment. + * New dev_ops functions should be added BELOW to avoid breaking ABI. + */ eth_rx_enable_intr_t rx_queue_intr_enable; /**< Enable Rx queue interrupt. */ eth_rx_disable_intr_t rx_queue_intr_disable; /**< Disable Rx queue interrupt. */ eth_tx_queue_setup_t tx_queue_setup;/**< Set up device TX queue. */ -- 2.20.1