[v10,7/7] eal: mark old definitions as deprecated
Checks
Commit Message
This patch marks the compatiablity macros with RTE_DEPRECATED
which causes a warning if used. There are no remaining warnings
in the current release.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_eal/include/rte_bus.h | 6 ++++--
lib/librte_eal/include/rte_dev.h | 6 ++++--
lib/librte_eal/include/rte_devargs.h | 6 ++++--
3 files changed, 12 insertions(+), 6 deletions(-)
Comments
On Tue, 2020-11-10 at 14:55 -0800, Stephen Hemminger wrote:
> This patch marks the compatiablity macros with RTE_DEPRECATED
> which causes a warning if used. There are no remaining warnings
> in the current release.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> lib/librte_eal/include/rte_bus.h | 6 ++++--
> lib/librte_eal/include/rte_dev.h | 6 ++++--
> lib/librte_eal/include/rte_devargs.h | 6 ++++--
> 3 files changed, 12 insertions(+), 6 deletions(-)
Reviewed-by: Luca Boccassi <bluca@debian.org>
@@ -220,8 +220,10 @@ enum rte_bus_scan_mode {
};
/* Backwards compatibility will be removed */
-#define RTE_BUS_SCAN_WHITELIST RTE_BUS_SCAN_ALLOWLIST
-#define RTE_BUS_SCAN_BLACKLIST RTE_BUS_SCAN_BLOCKLIST
+#define RTE_BUS_SCAN_WHITELIST \
+ RTE_DEPRECATED(RTE_BUS_SCAN_WHITELIST) RTE_BUS_SCAN_ALLOWLIST
+#define RTE_BUS_SCAN_BLACKLIST \
+ RTE_DEPRECATED(RTE_BUS_SCAN_BLACKLIST) RTE_BUS_SCAN_BLOCKLIST
/**
* A structure used to configure bus operations.
@@ -57,8 +57,10 @@ enum rte_dev_policy {
};
/* Backwards compatibility will be removed */
-#define RTE_DEV_WHITELISTED RTE_DEV_ALLOWED
-#define RTE_DEV_BLACKLISTED RTE_DEV_BLOCKED
+#define RTE_DEV_WHITELISTED \
+ RTE_DEPRECATED(RTE_DEV_WHITELISTED) RTE_DEV_ALLOWED
+#define RTE_DEV_BLACKLISTED \
+ RTE_DEPRECATED(RTE_DEV_BLACKLISTED) RTE_DEV_BLOCKED
/**
* A generic memory resource representation.
@@ -35,8 +35,10 @@ 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 \
+ RTE_DEPRECATED(RTE_DEVTYPE_WHITELISTED_PCI) RTE_DEVTYPE_ALLOWED
+#define RTE_DEVTYPE_BLACKLISTED_PCI \
+ RTE_DEPRECATED(RTE_DEVTYPE_BLACKLISTED_PCI) RTE_DEVTYPE_BLOCKED
/**
* Structure that stores a device given by the user with its arguments