Skip to contentSkip to conversation

Clear rx_mbuf_alloc_failed counter on rte_eth_stats_reset

PATCH Applied Igor Ryzhov 2 participants 4 messages Nov 27, 2015 – Dec 7, 2015 Network drivers

lore
Share & tools
lore
#0 lore raw

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)
#1 lore raw

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
index 3840775..41f5f0b 100644
@@ -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)
#2 lore raw

PATCH 2/2 virtio: remove unnecessary rx_mbuf_alloc_failed counter clearing

In reply to Igor Ryzhov

This 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
index 74c00ee..f5b72a3 100644
@@ -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)
Acked-by on the v1 series Applied
#3 lore raw
In reply to Igor Ryzhov

2015-11-27 13:31, Igor Ryzhov:

Quoted 6 lines

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

Applied, thanks