From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: [PATCH v12 03/22] net/dpaa2: add debug log support Date: Tue, 11 Apr 2017 19:19:19 +0530 Message-ID: <1491918578-4902-4-git-send-email-hemant.agrawal@nxp.com> References: <1491725483-6619-1-git-send-email-hemant.agrawal@nxp.com> <1491918578-4902-1-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , , , , To: Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0079.outbound.protection.outlook.com [104.47.37.79]) by dpdk.org (Postfix) with ESMTP id 1C08A69C5 for ; Tue, 11 Apr 2017 15:50:02 +0200 (CEST) In-Reply-To: <1491918578-4902-1-git-send-email-hemant.agrawal@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/Makefile | 5 +++++ drivers/net/dpaa2/dpaa2_ethdev.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/dpaa2/Makefile b/drivers/net/dpaa2/Makefile index c91e743..86db137 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 829d1b9..0b3dd67 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 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 @@ 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 @@ 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; } -- 1.9.1