[dpdk-dev] [PATCH 6/7] net/ixgbe/base: add some debug traces

Dai, Wei wei.dai at intel.com
Thu Jan 12 15:18:01 CET 2017


> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Wednesday, January 11, 2017 11:39 PM
> To: Dai, Wei <wei.dai at intel.com>; dev at dpdk.org
> Cc: Zhang, Helin <helin.zhang at intel.com>; Ananyev, Konstantin
> <konstantin.ananyev at intel.com>
> Subject: Re: [dpdk-dev] [PATCH 6/7] net/ixgbe/base: add some debug traces
> 
> On 1/10/2017 3:45 PM, Wei Dai wrote:
> > This patch adds some traces in the reset_hw logic and semaphore
> > acquisition logic to help debugging.
> 
> Is verbosity of the PMD changes with this update?
> 
> Is something required in PMD to disable DEBUGOUT1(), DEBUGOUT2(),
> DEBUGOUT() by default?

In drivers/net/ixgbe/ixgbe_logs.h, there are
#ifdef RTE_LIBRTE_IXGBE_DEBUG_DRIVER
#define PMD_DRV_LOG_RAW(level, fmt, args...) \
	RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
#else
#define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0)
#endif

And in drivers/net/ixgbe/base/ixgbe_osdep.h, there are
#include "../ixgbe_logs.h"
....
#define DEBUGOUT(S, args...)    PMD_DRV_LOG_RAW(DEBUG, S, ##args)
#define DEBUGOUT1(S, args...)   DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...)   DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...)   DEBUGOUT(S, ##args)
#define DEBUGOUT6(S, args...)   DEBUGOUT(S, ##args)
#define DEBUGOUT7(S, args...)   DEBUGOUT(S, ##args)

In config/common_base, there is 
CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER=n

So according above codes, the macro RTE_LIBRTE_IXGBE_DEBUG_DRIVER in drivers/net/ixgbe/ixgbe_logs.h is not defined
and PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0) will be valid,
then DEBUGOUT() is just a null definition by default.

> 
> >
> > Signed-off-by: Wei Dai <wei.dai at intel.com>
> > ---
> 
> <...>


More information about the dev mailing list