[v3,25/27] eal: mark old naming as deprecated
Checks
Commit Message
Use of old RTE_LCORE_FOREACH_SLAVE and rte_get_master_lcore_id()
are marked as deprecated.
All uses of these in DPDK itself is gone. This will cause warnings
for applications still using them.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_eal/include/rte_launch.h | 4 ++--
lib/librte_eal/include/rte_lcore.h | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
@@ -76,8 +76,8 @@ enum rte_rmt_call_initial_t {
/**
* Deprecated backward compatiable definitions
*/
-#define SKIP_MASTER SKIP_INITIAL
-#define CALL_MASTER CALL_INITIAL
+#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL
+#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL
/**
* Launch a function on all lcores.
@@ -67,6 +67,7 @@ unsigned int rte_get_initial_lcore(void);
* @return
* the id of the initial lcore
*/
+__rte_deprecated
unsigned int rte_get_master_lcore(void);
/**
@@ -216,7 +217,8 @@ unsigned int rte_get_next_lcore(unsigned int i, int skip_initial, int wrap);
/**
* Backward compatibility
*/
-#define RTE_LCORE_FOREACH_SLAVE(x) \
+#define RTE_LCORE_FOREACH_SLAVE(x) \
+ _Pragma("GCC warning \"'RTE_LCORE_FOREACH_SLAVE' macro is deprecated\"") \
RTE_LCORE_FOREACH_WORKER(x)