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 <rshearma@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
This commit is contained in:
Robert Shearman 2017-06-15 08:16:11 -04:00 committed by Ferruh Yigit
parent f8306df6bd
commit d2ed0889e3

View File

@ -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