[dpdk-dev] [PATCH v3 25/27] eal: mark old naming as deprecated

Stephen Hemminger stephen at networkplumber.org
Wed Jul 1 21:46:48 CEST 2020


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 at 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(-)

diff --git a/lib/librte_eal/include/rte_launch.h b/lib/librte_eal/include/rte_launch.h
index 9b68685d99d4..8d58ca5302a7 100644
--- a/lib/librte_eal/include/rte_launch.h
+++ b/lib/librte_eal/include/rte_launch.h
@@ -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.
diff --git a/lib/librte_eal/include/rte_lcore.h b/lib/librte_eal/include/rte_lcore.h
index 069cb1f427b9..eaa7c0f0b67c 100644
--- a/lib/librte_eal/include/rte_lcore.h
+++ b/lib/librte_eal/include/rte_lcore.h
@@ -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)
 
 
-- 
2.26.2



More information about the dev mailing list