From: Hemant Agrawal Date: Tue, 11 Apr 2017 13:49:19 +0000 (+0530) Subject: net/dpaa2: support debug log X-Git-Tag: spdx-start~3570 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d401ead13f8440dda77b8034ea3221a232a49f06;p=dpdk.git net/dpaa2: support debug log Signed-off-by: Hemant Agrawal --- diff --git a/config/common_base b/config/common_base index 5812b00b01..92bd9c974f 100644 --- a/config/common_base +++ b/config/common_base @@ -312,6 +312,11 @@ CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=n # Compile burst-oriented NXP DPAA2 PMD driver # CONFIG_RTE_LIBRTE_DPAA2_PMD=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_RX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX_FREE=n # # Compile burst-oriented VIRTIO PMD driver diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc index d2f174efc9..6e8f6fd94b 100644 --- a/config/defconfig_arm64-dpaa2-linuxapp-gcc +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc @@ -59,3 +59,8 @@ CONFIG_RTE_LIBRTE_FSLMC_BUS=y # Compile burst-oriented NXP DPAA2 PMD driver # CONFIG_RTE_LIBRTE_DPAA2_PMD=y +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_RX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX_FREE=n diff --git a/drivers/net/dpaa2/Makefile b/drivers/net/dpaa2/Makefile index c91e743bc7..86db13729c 100644 --- a/drivers/net/dpaa2/Makefile +++ b/drivers/net/dpaa2/Makefile @@ -36,8 +36,13 @@ include $(RTE_SDK)/mk/rte.vars.mk # LIB = librte_pmd_dpaa2.a +ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT),y) +CFLAGS += -O0 -g +CFLAGS += "-Wno-error" +else CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +endif CFLAGS += -I$(RTE_SDK)/drivers/net/dpaa2 CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 829d1b9606..0b3dd67e42 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -45,6 +45,7 @@ #include #include +#include #include #include "dpaa2_ethdev.h" @@ -53,6 +54,8 @@ static struct rte_dpaa2_driver rte_dpaa2_pmd; static int dpaa2_dev_init(struct rte_eth_dev *eth_dev) { + PMD_INIT_FUNC_TRACE(); + /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) return 0; @@ -65,6 +68,8 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev) static int dpaa2_dev_uninit(struct rte_eth_dev *eth_dev __rte_unused) { + PMD_INIT_FUNC_TRACE(); + if (rte_eal_process_type() != RTE_PROC_PRIMARY) return -EPERM; @@ -92,8 +97,8 @@ rte_dpaa2_probe(struct rte_dpaa2_driver *dpaa2_drv __rte_unused, sizeof(struct dpaa2_dev_priv), RTE_CACHE_LINE_SIZE); if (eth_dev->data->dev_private == NULL) { - RTE_LOG(CRIT, PMD, "Cannot allocate memzone for" - " private port data\n"); + PMD_INIT_LOG(CRIT, "Cannot allocate memzone for" + " private port data\n"); rte_eth_dev_release_port(eth_dev); return -ENOMEM; }