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 0C9F4A0562; Tue, 31 Mar 2020 19:32:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 769001C10E; Tue, 31 Mar 2020 19:31:34 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id A6E021C0D2 for ; Tue, 31 Mar 2020 19:31:29 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id 142so10628472pgf.11 for ; Tue, 31 Mar 2020 10:31:29 -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=1wt2KltLzYbHaCbMJ3n6lmj/ONew3Mlz5BQiSMlwJsQ=; b=wPtwOZt3eox14PvGXDxD2FamuxI1XP6om22RBgIbLwP3ksM7ZDdnDUc4M/FlP3h9bN y+cxLhj7eQcJeDDevQXFFF+D8rpdhhv0mQ2bwt7NHwQ3Gk3cw+B6GGawjPrWGDO7E46p 4EQy5A8FDNnMnuQYCMVjs1Yj+xzNJ8nkiiADNermWEVHsMfaAStpQTrW50Zp1tfrEll8 NBOY22fYgWhFrVWoQ3nNtVSY4xfZ8RnV5WKk0uWpP5zBV33lWGbcTZ9yHCSmvCJD57ej XyzB6a7Fnk1lJjLpVPZaCyqajFRUmMo26qlOdA8Rb9u5/Kd/36a5TO1CM/PEGNEx/S3U ey7Q== 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=1wt2KltLzYbHaCbMJ3n6lmj/ONew3Mlz5BQiSMlwJsQ=; b=Z+GF7plG1tLM0P25trP0RP5+VPccz/Y2JHzhwkCJCqpUaePPxzjwoH5iMoGkU+m/CD xLnq6UQhKZS9Qh94/N5uekz20pgC57GAjRFzWvqUiBb15WUQo99QS6ht0pxAkmGm5n9T jbQUnn166ladUAEj9yM6WUr5HSp1ljivbWcWwoCBMb5XMkxySRtiOx1unlUVPIqDE8S8 /IYRaSOwK8dzSg3WhpYniOq1tcd8qBA3L1Xjx9uWpiXbYOz4rJPKq84pjTVxJul6k2bP wRhIFbXaOCB8dbR3Uvm8zW3jb+U7lB214SroDmJZhj/N9j1885RZxoosNyG9AHebptWK E7Lw== X-Gm-Message-State: ANhLgQ3k2bhRopajN1FZyNHKXRBYjGgBLXKI4MOCU+pxwcTIxcCOq0El XIlG6Tp6WSv+WqVAilEk3RcgiKuYpWRNOQ== X-Google-Smtp-Source: ADFU+vvEc+uedxDdK8EmUJpmjGec8tZdj3rzlvfyED8aOlmErpBLlJaA9S9dliS/CHmPAngG33fmzQ== X-Received: by 2002:a63:6d3:: with SMTP id 202mr18733750pgg.445.1585675888328; Tue, 31 Mar 2020 10:31:28 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 198sm12999261pfa.87.2020.03.31.10.31.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 10:31:27 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , shreyansh.jain@nxp.com Date: Tue, 31 Mar 2020 10:31:09 -0700 Message-Id: <20200331173110.25746-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200331173110.25746-1-stephen@networkplumber.org> References: <20200331044156.31935-1-stephen@networkplumber.org> <20200331173110.25746-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 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 | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index fce9ce2feb9d..5f81968d80e1 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,7 @@ 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