[dpdk-dev] [PATCH 1/2] ethdev: move log macro to header
Thomas Monjalon
thomas at monjalon.net
Tue May 1 20:56:28 CEST 2018
01/05/2018 19:28, Ferruh Yigit:
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> -static int ethdev_logtype;
> -
> -#define ethdev_log(level, fmt, ...) \
> - rte_log(RTE_LOG_ ## level, ethdev_logtype, fmt "\n", ## __VA_ARGS__)
> +int ethdev_logtype;
>
[...]
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> +extern int ethdev_logtype;
> +
> +#define RTE_ETHDEV_LOG(level, fmt, ...) \
> + rte_log(RTE_LOG_ ## level, ethdev_logtype, fmt "\n", ## __VA_ARGS__)
Why moving this macro in the header file? For using it in inline functions?
Probably worth an explanation in the commit message.
More information about the dev
mailing list