From: Igor Ryzhov Date: Fri, 27 Nov 2015 10:31:06 +0000 (+0300) Subject: ethdev: fix reset of Rx mbuf allocation failures X-Git-Tag: spdx-start~7842 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e1cf0d085327c0057ca4961c939381b237f06111;p=dpdk.git 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 Acked-by: Thomas Monjalon --- diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index ae7c281c48..16ff827656 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -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 diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index c3eed49819..ed971b4909 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -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 */