numam-dpdk/lib/librte_eal
Adrien Mazarguil 37aa3a47a2 eal: fix debug macro redefinition
The RTE_FUNC_*_RET() and RTE_PROC_*_RET() macro definitions in rte_dev.h
require RTE_PMD_DEBUG_TRACE(). This macro is defined as needed by users of
rte_dev.h since its value depends on their own debug settings.

It may be defined multiple times as a result when including files from
various components simultaneously. Worse, these redefinitions may be
inconsistent. This causes the following compilation errors:

 In file included from /tmp/check-includes.sh.13890.c:27:0:
    build/include/rte_eventdev_pmd.h:58:0: error: "RTE_PMD_DEBUG_TRACE"
    redefined [-Werror]
 [...]
 In file included from build/include/rte_ethdev_pci.h:39:0,
                  from /tmp/check-includes.sh.13890.c:13:
    build/include/rte_ethdev.h:1042:0: note: this is the location of the
    previous definition
 [...]
 In file included from /tmp/check-includes.sh.13890.c:83:0:
    build/include/rte_cryptodev_pmd.h:65:0: error: "RTE_PMD_DEBUG_TRACE"
    redefined [-Werror]
 [...]
 In file included from /tmp/check-includes.sh.13890.c:27:0:
    build/include/rte_eventdev_pmd.h:58:0: note: this is the location of
    the previous definition
 [...]

This commit moves the RTE_PMD_DEBUG_TRACE() definition to rte_dev.h where
it is enabled consistently depending on global configuration settings and
removes redundant definitions.

Also when disabled, RTE_PMD_DEBUG_TRACE() is now defined as (void)0 to
avoid empty statements warnings if used outside { } blocks.

Fixes: b974e4a40c ("ethdev: make error checking macros public")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-05-01 00:10:23 +02:00
..
bsdapp eal: remove log level from internal config 2017-04-20 01:29:11 +02:00
common eal: fix debug macro redefinition 2017-05-01 00:10:23 +02:00
linuxapp vfio: fix structures for sPAPR IOMMU 2017-04-30 19:44:34 +02:00
Makefile mk: optimize directory dependencies 2017-03-27 23:28:43 +02:00