[dpdk-dev] [PATCH 5/6] net/ngbe: add log type and error type

Thomas Monjalon thomas at monjalon.net
Thu Mar 18 13:04:03 CET 2021


18/03/2021 10:32, Jiawen Wu:
> +#ifdef RTE_LIBRTE_NGBE_DEBUG_RX
> +extern int ngbe_logtype_rx;
> +#define PMD_RX_LOG(level, fmt, args...) \
> +	rte_log(RTE_LOG_ ## level, ngbe_logtype_rx,	\
> +		"%s(): " fmt "\n", __func__, ##args)
> +#else
> +#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
> +#endif
> +
> +#ifdef RTE_LIBRTE_NGBE_DEBUG_TX
> +extern int ngbe_logtype_tx;
> +#define PMD_TX_LOG(level, fmt, args...) \
> +	rte_log(RTE_LOG_ ## level, ngbe_logtype_tx,	\
> +		"%s(): " fmt "\n", __func__, ##args)
> +#else
> +#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
> +#endif

There is a discussion about using ethdev debug flags in PMDs.
Please check the mailing list:
https://inbox.dpdk.org/dev/20210318014234.2255366-2-qi.z.zhang@intel.com/




More information about the dev mailing list