[dpdk-dev] [PATCH v5 8/9] eal: mark old macros for blacklist/whitelist as deprecated
Stephen Hemminger
stephen at networkplumber.org
Thu Jul 16 01:02:56 CEST 2020
Use of these macros in applications should cause a deprecation
warning.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Luca Boccassi <bluca at debian.org>
---
lib/librte_eal/include/rte_bus.h | 9 +++++++--
lib/librte_eal/include/rte_dev.h | 10 +++++++---
lib/librte_eal/include/rte_devargs.h | 9 +++++++--
3 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/lib/librte_eal/include/rte_bus.h b/lib/librte_eal/include/rte_bus.h
index 19309ad2ddd7..aa0f3aa9c81b 100644
--- a/lib/librte_eal/include/rte_bus.h
+++ b/lib/librte_eal/include/rte_bus.h
@@ -220,8 +220,13 @@ enum rte_bus_scan_mode {
};
/* Backwards compatibility will be deprecated */
-#define RTE_BUS_SCAN_WHITELIST RTE_BUS_SCAN_ALLOWLIST
-#define RTE_BUS_SCAN_BLACKLIST RTE_BUS_SCAN_BLOCKLIST
+#define RTE_BUS_SCAN_WHITELIST \
+ _Pragma("GCC warning \"'RTE_BUS_SCAN_WHITELIST' macro is deprecated.\"") \
+ RTE_BUS_SCAN_ALLOWLIST
+
+#define RTE_BUS_SCAN_BLACKLIST \
+ _Pragma("GCC warning \"'RTE_BUS_SCAN_BLACKLIST' macro is deprecated.\"") \
+ RTE_BUS_SCAN_BLOCKLIST
/**
* A structure used to configure bus operations.
diff --git a/lib/librte_eal/include/rte_dev.h b/lib/librte_eal/include/rte_dev.h
index 1208b1e99b05..81dded1dad24 100644
--- a/lib/librte_eal/include/rte_dev.h
+++ b/lib/librte_eal/include/rte_dev.h
@@ -74,9 +74,13 @@ enum rte_dev_policy {
RTE_DEV_BLOCKED,
};
-/* Backwards compatiablity will be deprecated */
-#define RTE_DEV_WHITELISTED RTE_DEV_ALLOWED
-#define RTE_DEV_BLACKLISTED RTE_DEV_BLOCKED
+#define RTE_DEV_WHITELISTED \
+ _Pragma("GCC warning \"'RTE_DEV_WHITELISTED' macro is deprecated.\"") \
+ RTE_DEV_ALLOWED
+
+#define RTE_DEV_BLACKLISTED \
+ _Pragma("GCC warning \"'RTE_DEV_BLACKLISTED' macro is deprecated.\"") \
+ RTE_DEV_BLOCKED
/**
* A generic memory resource representation.
diff --git a/lib/librte_eal/include/rte_devargs.h b/lib/librte_eal/include/rte_devargs.h
index 407816343ef0..b3a8af1d49de 100644
--- a/lib/librte_eal/include/rte_devargs.h
+++ b/lib/librte_eal/include/rte_devargs.h
@@ -35,8 +35,13 @@ enum rte_devtype {
};
/* Backwards compatibility will be removed later */
-#define RTE_DEVTYPE_WHITELISTED_PCI RTE_DEVTYPE_ALLOWED
-#define RTE_DEVTYPE_BLACKLISTED_PCI RTE_DEVTYPE_BLOCKED
+#define RTE_DEVTYPE_WHITELISTED_PCI \
+ _Pragma("GCC warning \"'RTE_DEVTYPE_WHITELISTED_PCI' macro is deprecated.\"") \
+ RTE_DEVTYPE_ALLOWED
+
+#define RTE_DEVTYPE_BLACKLISTED_PCI \
+ _Pragma("GCC warning \"'RTE_DEVTYPE_BLACKLISTED_PCI' macro is deprecated.\"") \
+ RTE_DEVTYPE_BLOCKED
/**
* Structure that stores a device given by the user with its arguments
--
2.27.0
More information about the dev
mailing list