From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AE9BCA0562; Tue, 31 Mar 2020 06:43:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C1BAD1C0C7; Tue, 31 Mar 2020 06:42:20 +0200 (CEST) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 89B711C0B5 for ; Tue, 31 Mar 2020 06:42:15 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id e1so7644336plt.9 for ; Mon, 30 Mar 2020 21:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tG+/U7x5Z+gugjcCBLn14Jm9KyXgv4aLbb6fHw6Ev4c=; b=eqL7MLtR5mnazzQut78L4uKntEKANdT8bQl24Ix1tGlM7Ke02tb08SmHe0DzTNFx8H /ph2tgYQCzEMbyvlveJnVQVCPC5bh0CSXo0ifjSGiPYcWUCNmruonh/YN0lYx1E/n/lq +MKRmR/SoeUJMydF/QykPd1Qqj2DOY7SH/zz06cdRsW+ROsOjbkbMTPy8A8B0v1O7uBO u3LYbbxodgLqjSa42bzlRcXissfSBTcoLPttPgpIra/jrLYYG+OKOyr4egJ1L6R4Dzqp Bd6h0jpzcNhYe9gUPJKHUfwq33ni9yIIz/nfwYwYDePcrUxDEK/u5qhutaZnNV9qU2Nm 7kXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tG+/U7x5Z+gugjcCBLn14Jm9KyXgv4aLbb6fHw6Ev4c=; b=fZFe9qoSyq1cc+FOQkMRVZvK9nJ0aXBN81If9fMeC3SxqHxm/Ujncs08nAtFKwiHqg tFw35cdRAM3fIUxyicVSycSiS9ex3Zy6RaHkjkCJ/P52TmXivaBUEo1xXr6zrnu/i1To +ocPRmg6e7hTLB46Tqneeyotx17XfgXPQlwpn+ucfL+dsb5qHS/6ljxDLMTwEwwsPLNQ +j+bJN4A1ZoL6KcgBR/A7gK8yBk0FvAPTd8ngMJW34HbAPvC76U411jolrHplfLWuAvP /nHthOfELYuiGt6CeomFb50gTnHTYy4hDAkg9cI/fu8Dj5BTG0ohZof8yzbyrbnGW01a yeQA== X-Gm-Message-State: AGi0Pubpe21S+a191iiifoZ7wAl3p0Tv6L4amYgFGxYevK5HFlq2Dfue Zc1mppkFBt/wCJrBKikHG0b/C3OETO427Q== X-Google-Smtp-Source: APiQypIMFESMrzUO3TU1qTVTftOdsIbvjgpm8Hr5AUVTLTGRBMlIdErfYSbZwuYxLMq/my51CtixOw== X-Received: by 2002:a17:90b:24c:: with SMTP id fz12mr1634905pjb.85.1585629734212; Mon, 30 Mar 2020 21:42:14 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id u129sm11417107pfb.101.2020.03.30.21.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 21:42:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , shreyansh.jain@nxp.com Date: Mon, 30 Mar 2020 21:41:55 -0700 Message-Id: <20200331044156.31935-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200331044156.31935-1-stephen@networkplumber.org> References: <20200331044156.31935-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 6/7] net/dpaa: use dynamic logtype X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The static PMD logtype should not be used by drivers. Instead, use existing log macros in this driver. Also use standard rte_ether routine to format ether address. Fixes: 37f9b54bd3cf ("net/dpaa: support Tx and Rx queue setup") Cc: shreyansh.jain@nxp.com Signed-off-by: Stephen Hemminger --- drivers/net/dpaa/dpaa_ethdev.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index fce9ce2feb9d..f59c2631a56c 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -881,8 +881,8 @@ dpaa_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) PMD_INIT_FUNC_TRACE(); if (qman_query_fq_frm_cnt(rxq, &frm_cnt) == 0) { - RTE_LOG(DEBUG, PMD, "RX frame count for q(%d) is %u\n", - rx_queue_id, frm_cnt); + DPAA_PMD_DEBUG("RX frame count for q(%d) is %u", + rx_queue_id, frm_cnt); } return frm_cnt; } @@ -996,8 +996,7 @@ dpaa_dev_add_mac_addr(struct rte_eth_dev *dev, ret = fman_if_add_mac_addr(dpaa_intf->fif, addr->addr_bytes, index); if (ret) - RTE_LOG(ERR, PMD, "error: Adding the MAC ADDR failed:" - " err = %d", ret); + DPAA_PMD_ERR("Adding the MAC ADDR failed: err = %d", ret); return 0; } @@ -1023,7 +1022,7 @@ dpaa_dev_set_mac_addr(struct rte_eth_dev *dev, ret = fman_if_add_mac_addr(dpaa_intf->fif, addr->addr_bytes, 0); if (ret) - RTE_LOG(ERR, PMD, "error: Setting the MAC ADDR failed %d", ret); + DPAA_PMD_ERR("Setting the MAC ADDR failed %d", ret); return ret; } @@ -1306,6 +1305,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) struct fman_if *fman_intf; struct fman_if_bpool *bp, *tmp_bp; uint32_t cgrid[DPAA_MAX_NUM_PCD_QUEUES]; + char eth_buf[RTE_ETHER_ADDR_FMT_SIZE]; PMD_INIT_FUNC_TRACE(); @@ -1457,15 +1457,9 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) /* copy the primary mac address */ rte_ether_addr_copy(&fman_intf->mac_addr, ð_dev->data->mac_addrs[0]); + rte_ether_format_addr(eth_buf, sizeof(eth_buf), &fman_intf->mac_addr); - RTE_LOG(INFO, PMD, "net: dpaa: %s: %02x:%02x:%02x:%02x:%02x:%02x\n", - dpaa_device->name, - fman_intf->mac_addr.addr_bytes[0], - fman_intf->mac_addr.addr_bytes[1], - fman_intf->mac_addr.addr_bytes[2], - fman_intf->mac_addr.addr_bytes[3], - fman_intf->mac_addr.addr_bytes[4], - fman_intf->mac_addr.addr_bytes[5]); + DPAA_PMD_INFO("net: dpaa: %s: %s", dpaa_device->name, eth_buf); /* Disable RX mode */ fman_if_discard_rx_errors(fman_intf); @@ -1578,8 +1572,8 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused, if (!is_global_init && (rte_eal_process_type() == RTE_PROC_PRIMARY)) { if (access("/tmp/fmc.bin", F_OK) == -1) { - RTE_LOG(INFO, PMD, - "* FMC not configured.Enabling default mode\n"); + DPAA_PMD_INFO( + "* FMC not configured.Enabling default mode"); default_q = 1; } -- 2.20.1