Clear rx_mbuf_alloc_failed counter on rte_eth_stats_reset
cover Clear rx_mbuf_alloc_failed counter on rte_eth_stats_reset
The rx_mbuf_alloc_failed counter was only cleared by virtio driver. Now it is cleared by common rte_eth_stats_clear function for all drivers at once.
Igor Ryzhov (2):
ethdev: clear rx_mbuf_alloc_failed counter on rte_eth_stats_reset
virtio: remove unnecessary rx_mbuf_alloc_failed counter clearing
drivers/net/virtio/virtio_ethdev.c | 2 -- lib/librte_ether/rte_ethdev.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)
Signature · 1 line
2.4.9 (Apple Git-60)
PATCH 1/2 ethdev: clear rx_mbuf_alloc_failed counter on rte_eth_stats_reset
--- lib/librte_ether/rte_ethdev.c | 1 + 1 file changed, 1 insertion(+)
lib/librte_ether/rte_ethdev.c +1 -0
@@ -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 */
Signature · 1 line
2.4.9 (Apple Git-60)
PATCH 2/2 virtio: remove unnecessary rx_mbuf_alloc_failed counter clearing
In reply to Igor RyzhovThis counter is cleared in rte_eth_stats_reset.
--- drivers/net/virtio/virtio_ethdev.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/virtio/virtio_ethdev.c +0 -2
@@ -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
Signature · 1 line
2.4.9 (Apple Git-60)
2015-11-27 13:31, Igor Ryzhov:
Quoted 6 lines
The
rx_mbuf_alloc_failedcounter was only cleared by virtio driver. Now it is cleared by commonrte_eth_stats_clearfunction for all drivers at once.Igor Ryzhov (2):
ethdev: clearrx_mbuf_alloc_failedcounter onrte_eth_stats_reset
virtio: remove unnecessaryrx_mbuf_alloc_failedcounter clearing
Applied, thanks