From: Stephen Hemminger Date: Fri, 11 Jan 2019 20:35:20 +0000 (-0800) Subject: net/tap: do not print pointer in info message X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=04df418f0fafa03f5f9f6326d3e1e517a1eaec47;p=dpdk.git net/tap: do not print pointer in info message Printing pointer in log is uninformative (unless in a debugger), instead print the assigned kernel device name which correlates well with what TAP is doing. Signed-off-by: Stephen Hemminger Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 705c90dade..586c8a952d 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -853,6 +853,8 @@ tap_dev_stop(struct rte_eth_dev *dev) static int tap_dev_configure(struct rte_eth_dev *dev) { + struct pmd_internals *pmd = dev->data->dev_private; + if (dev->data->nb_rx_queues > RTE_PMD_TAP_MAX_QUEUES) { TAP_LOG(ERR, "%s: number of rx queues %d exceeds max num of queues %d", @@ -870,11 +872,11 @@ tap_dev_configure(struct rte_eth_dev *dev) return -1; } - TAP_LOG(INFO, "%s: %p: TX configured queues number: %u", - dev->device->name, (void *)dev, dev->data->nb_tx_queues); + TAP_LOG(INFO, "%s: %s: TX configured queues number: %u", + dev->device->name, pmd->name, dev->data->nb_tx_queues); - TAP_LOG(INFO, "%s: %p: RX configured queues number: %u", - dev->device->name, (void *)dev, dev->data->nb_rx_queues); + TAP_LOG(INFO, "%s: %s: RX configured queues number: %u", + dev->device->name, pmd->name, dev->data->nb_rx_queues); return 0; }