From d2ed0889e3ed7da6d541fbc24b6f2fc964492500 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Thu, 15 Jun 2017 08:16:11 -0400 Subject: [PATCH] net/vmxnet3: make event processing less noisy Make vmxnet3_process_events less noisy by removing logging when there are no events to process and by making link, device-change and debug events DEBUG level rather than ERR. Change these to use PMD_DRV_LOG instead of PMD_INIT_LOG since they don't happen at device init. Signed-off-by: Robert Shearman Acked-by: Shrikrishna Khare --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 6ef72b18cf..54358e33c6 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -1307,10 +1307,8 @@ vmxnet3_process_events(struct rte_eth_dev *dev) struct vmxnet3_hw *hw = dev->data->dev_private; uint32_t events = hw->shared->ecr; - if (!events) { - PMD_INIT_LOG(ERR, "No events to process"); + if (!events) return; - } /* * ECR bits when written with 1b are cleared. Hence write @@ -1320,9 +1318,7 @@ vmxnet3_process_events(struct rte_eth_dev *dev) /* Check if link state has changed */ if (events & VMXNET3_ECR_LINK) { - PMD_INIT_LOG(ERR, - "Process events in %s(): VMXNET3_ECR_LINK event", - __func__); + PMD_DRV_LOG(DEBUG, "Process events: VMXNET3_ECR_LINK event"); if (vmxnet3_dev_link_update(dev, 0) == 0) _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, @@ -1335,11 +1331,11 @@ vmxnet3_process_events(struct rte_eth_dev *dev) VMXNET3_CMD_GET_QUEUE_STATUS); if (hw->tqd_start->status.stopped) - PMD_INIT_LOG(ERR, "tq error 0x%x", - hw->tqd_start->status.error); + PMD_DRV_LOG(ERR, "tq error 0x%x", + hw->tqd_start->status.error); if (hw->rqd_start->status.stopped) - PMD_INIT_LOG(ERR, "rq error 0x%x", + PMD_DRV_LOG(ERR, "rq error 0x%x", hw->rqd_start->status.error); /* Reset the device */ @@ -1347,10 +1343,10 @@ vmxnet3_process_events(struct rte_eth_dev *dev) } if (events & VMXNET3_ECR_DIC) - PMD_INIT_LOG(ERR, "Device implementation change event."); + PMD_DRV_LOG(DEBUG, "Device implementation change event."); if (events & VMXNET3_ECR_DEBUG) - PMD_INIT_LOG(ERR, "Debug event generated by device."); + PMD_DRV_LOG(DEBUG, "Debug event generated by device."); } static void