ethdev: fix reset of Rx mbuf allocation failures

The rx_mbuf_alloc_failed counter was only cleared by virtio driver.
Now it is cleared by common rte_eth_stats_reset function for all
drivers at once.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
Igor Ryzhov 2015-11-27 13:31:06 +03:00 committed by Thomas Monjalon
parent 57ccb27808
commit e1cf0d0853
2 changed files with 1 additions and 2 deletions

View File

@ -788,8 +788,6 @@ virtio_dev_stats_reset(struct rte_eth_dev *dev)
rxvq->broadcast = 0;
memset(rxvq->size_bins, 0, sizeof(rxvq->size_bins[0]) * 8);
}
dev->data->rx_mbuf_alloc_failed = 0;
}
static void

View File

@ -1456,6 +1456,7 @@ rte_eth_stats_reset(uint8_t port_id)
RTE_FUNC_PTR_OR_RET(*dev->dev_ops->stats_reset);
(*dev->dev_ops->stats_reset)(dev);
dev->data->rx_mbuf_alloc_failed = 0;
}
/* retrieve ethdev extended statistics */