From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>, shreyansh.jain@nxp.com
Subject: [dpdk-dev] [PATCH 6/7] net/dpaa: use dynamic logtype
Date: Mon, 30 Mar 2020 21:41:55 -0700 [thread overview]
Message-ID: <20200331044156.31935-7-stephen@networkplumber.org> (raw)
In-Reply-To: <20200331044156.31935-1-stephen@networkplumber.org>
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 <stephen@networkplumber.org>
---
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
next prev parent reply other threads:[~2020-03-31 4:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 4:41 [dpdk-dev] [PATCH 0/7] Remove uses of PMD logtype Stephen Hemminger
2020-03-31 4:41 ` [dpdk-dev] [PATCH 1/7] net/mvneta: do not use " Stephen Hemminger
2020-03-31 4:41 ` [dpdk-dev] [PATCH 2/7] net/virtio: " Stephen Hemminger
2020-03-31 4:41 ` [dpdk-dev] [PATCH 3/7] net/tap: " Stephen Hemminger
2020-03-31 4:41 ` [dpdk-dev] [PATCH 4/7] net/pfe: " Stephen Hemminger
2020-03-31 4:41 ` [dpdk-dev] [PATCH 5/7] net/bnxt: don't " Stephen Hemminger
2020-03-31 4:43 ` Somnath Kotur
2020-03-31 4:41 ` Stephen Hemminger [this message]
2020-03-31 4:41 ` [dpdk-dev] [PATCH 7/7] net/thunderx: use dynamic logtype Stephen Hemminger
2020-03-31 17:31 ` [dpdk-dev] [PATCH v2 0/7] Remove some uses of PMD logtype Stephen Hemminger
2020-03-31 17:31 ` [dpdk-dev] [PATCH v2 1/7] net/mvneta: do not use " Stephen Hemminger
2020-03-31 17:31 ` [dpdk-dev] [PATCH v2 2/7] net/virtio: " Stephen Hemminger
2020-03-31 17:31 ` [dpdk-dev] [PATCH v2 3/7] net/tap: " Stephen Hemminger
2020-03-31 17:31 ` [dpdk-dev] [PATCH v2 4/7] net/pfe: " Stephen Hemminger
2020-03-31 17:31 ` [dpdk-dev] [PATCH v2 5/7] net/bnxt: don't " Stephen Hemminger
2020-03-31 17:31 ` [dpdk-dev] [PATCH v2 6/7] net/dpaa: use dynamic logtype Stephen Hemminger
2020-03-31 17:31 ` [dpdk-dev] [PATCH v2 7/7] net/thunderx: " Stephen Hemminger
2020-03-31 17:43 ` [dpdk-dev] [PATCH v2 0/7] Remove some uses of PMD logtype Ferruh Yigit
2020-03-31 17:49 ` Ferruh Yigit
2020-03-31 17:42 ` [dpdk-dev] [PATCH 0/7] Remove " Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200331044156.31935-7-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=shreyansh.jain@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).