[RFC,v2,26/26] eal: mark old naming as deprecated
diff mbox series

Message ID 20200605225811.26342-27-stephen@networkplumber.org
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series
  • Change references to master/slave to
Related show

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Stephen Hemminger June 5, 2020, 10:58 p.m. UTC
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(-)

Patch
diff mbox series

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)