[dpdk-dev] [PATCH 1/3] net/e1000: optimize Rx/Tx log message level

Stephen Hemminger stephen at networkplumber.org
Tue Dec 6 23:41:44 CET 2016


On Sat,  3 Dec 2016 18:43:01 +0800
Qiming Yang <qiming.yang at intel.com> wrote:

>  
> +#ifdef RTE_LIBRTE_E1000_DEBUG_RX_FREE
> +#define PMD_RX_FREE_LOG(level, fmt, args...) \
> +	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
> +#else
> +#define PMD_RX_FREE_LOG(level, fmt, args...) do { } while (0)
> +#endif

If you have to copy/paste same code in more than one driver, that
looks like a missing interface.  I.e Do not Repeat Yourself.



More information about the dev mailing list