net/dpaa2: support debug log

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit is contained in:
Hemant Agrawal 2017-04-11 19:19:19 +05:30 committed by Ferruh Yigit
parent 846a8305f2
commit d401ead13f
4 changed files with 22 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -45,6 +45,7 @@
#include <rte_ethdev.h>
#include <rte_fslmc.h>
#include <fslmc_logs.h>
#include <fslmc_vfio.h>
#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;
}