[dpdk-dev] [PATCH] cryptodev: fix RTE_PMD_DEBUG_TRACE redefinition

Thomas Monjalon thomas.monjalon at 6wind.com
Thu Mar 10 19:23:25 CET 2016


2016-03-03 00:34, Marc Sune:
> RTE_PMD_DEBUG_TRACE used RTE_FUNC_PTR_OR_ERR_RET was redefined
> in rte_cryptodev_pmd.h which produced MACRO redefinition warnings
> when including both rte_cryptodev_pmd.h and rte_ethdev.h.
> 
> This commit moves MACRO definition to rte_cryptodev.c to prevent
> this warning.

It is not the right fix.

This macro should probably be renamed with a crypto prefix or defined
only once (same thing for ethdev).
The function rte_pmd_debug_trace() and the macros
RTE_PROC_PRIMARY_OR_ERR_RET,
RTE_PROC_PRIMARY_OR_RET,
RTE_FUNC_PTR_OR_ERR_RET,
RTE_FUNC_PTR_OR_RET
should not be in lib/librte_eal/common/include/rte_dev.h.
The macros call RTE_PMD_DEBUG_TRACE which is defined elsewhere.
The rte_log.h is probably a better place.
But why these macros have no PMD prefix?



More information about the dev mailing list