[dpdk-dev] [PATCH v3 2/4] ethdev: move error checking macros to header

Thomas Monjalon thomas.monjalon at 6wind.com
Wed Nov 4 02:19:36 CET 2015


2015-11-03 12:00, Bruce Richardson:
> Move the function ptr and port id checking macros to the header file, so
> that they can be used in the static inline functions there. In doxygen
> comments, mark them as for internal use only.
[...]
> +/**
> + * @internal
> + *  Macro to print a message if in debugging mode
> + */
> +#ifdef RTE_LIBRTE_ETHDEV_DEBUG
> +#define RTE_PMD_DEBUG_TRACE(fmt, args...) \
> +		RTE_LOG(ERR, PMD, "%s: " fmt, __func__, ## args)
> +#else
> +#define RTE_PMD_DEBUG_TRACE(fmt, args...)
> +#endif

It does not compile because Mellanox drivers are pedantic:

In file included from /home/thomas/projects/dpdk/dpdk/drivers/net/mlx4/mlx4.c:78:0:
/home/thomas/projects/dpdk/dpdk/x86_64-native-linuxapp-gcc-shared-next/include/rte_ethdev.h: At top level:
/home/thomas/projects/dpdk/dpdk/x86_64-native-linuxapp-gcc-shared-next/include/rte_ethdev.h:933:38: error: ISO C does not permit named variadic macros [-Werror=variadic-macros]
 #define RTE_PMD_DEBUG_TRACE(fmt, args...) \



More information about the dev mailing list