[dpdk-dev] [PATCH 1/2] ethdev: move log macro to header
Stephen Hemminger
stephen at networkplumber.org
Wed May 2 16:45:46 CEST 2018
On Wed, 2 May 2018 10:40:08 +0100
Ferruh Yigit <ferruh.yigit at intel.com> wrote:
> On 5/1/2018 7:56 PM, Thomas Monjalon wrote:
> > 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.
>
> Yes mainly for RTE_PMD_DEBUG_TRACE usage in header file. The ones in
> RTE_ETH_VALID_PORTID_... macros and inline functions, which I didn't update in
> this set.
>
> I will update the commit log.
It would be great to eliminate all usage of PMD log level (and maybe even EAL)
in a future release.
More information about the dev
mailing list