On Thu, Nov 05, 2020 at 02:35:57PM -0800, Stephen Hemminger wrote:
> This patch renames the enum values in the EAL include files.
> As a backward compatible temporary migration tool, define
> a replacement mapping for old values.
> 
> The old names relating to blacklist and whitelist are replaced
> by block list and allow list, but applications may be using the
> older compatibility macros. To help with conversion to new names
> cause a message when the compatibility names are used.
> 
> Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
> Acked-by: Luca Boccassi <bl...@debian.org>
> Acked-by: Gaetan Rivet <gr...@u256.net>
> ---
>  lib/librte_eal/common/eal_common_devargs.c | 14 +++++++-------
>  lib/librte_eal/include/rte_bus.h           | 10 ++++++++--
>  lib/librte_eal/include/rte_dev.h           | 10 ++++++++--
>  lib/librte_eal/include/rte_devargs.h       | 10 ++++++++--
>  4 files changed, 31 insertions(+), 13 deletions(-)
> 
<snip>  
> +/* Backwards compatibility will be removed later */
> +#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
> +

This patch causes build failures which persist until patch 3, because of
these deprecations. I think you need to define the backward-compatibility
macros here, but only mark them deprecated at the end of the set.

/Bruce

../lib/librte_eal/common/eal_common_options.c: In function 
‘eal_parse_common_option’:
../lib/librte_eal/common/eal_common_options.c:1458:13: error: 
"RTE_DEVTYPE_BLACKLISTED_PCI" is deprecated [-Werror]
 1458 |   if (eal_option_device_add(RTE_DEVTYPE_BLACKLISTED_PCI,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/librte_eal/common/eal_common_options.c:1468:13: error: 
"RTE_DEVTYPE_WHITELISTED_PCI" is deprecated [-Werror]
 1468 |   if (eal_option_device_add(RTE_DEVTYPE_WHITELISTED_PCI,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Reply via email to