virtio_net: return already tracked tx_fifo_errors via virtnet_getstats()
Subsystems (3)
PATCH 1/1 virtio_net: return already tracked tx_fifo_errors via virtnet_getstats()
From: Rick Jones <[email protected]>
Tx_fifo_errors are tracked in start_xmit_ for virtio_net, but not reported in the tallies returned by virtnet_stats(). Return them as the rx "sub-stats" rx_length_errors and rx_frame_errors are.
Signed-off-by Rick Jones <[email protected]>
---
Compiled and booted in a guest, but no tx_fifo_errors generated.
drivers/net/virtio_net.c +1 -0
@@ -700,6 +700,7 @@ static struct rtnl_link_stats64 *virtnet_stats(struct net_device *dev, } tot->tx_dropped = dev->stats.tx_dropped; + tot->tx_fifo_errors = dev->stats.tx_fifo_errors; tot->rx_dropped = dev->stats.rx_dropped; tot->rx_length_errors = dev->stats.rx_length_errors; tot->rx_frame_errors = dev->stats.rx_frame_errors;
Quoted 7 lines · On Mon, 21 Nov 2011 11:28:17 -0800 (PST), [email protected] (Rick Jones)…
From: Rick Jones <[email protected]>
Tx_fifo_errorsare tracked instart_xmit_forvirtio_net, but not reported in the tallies returned byvirtnet_stats(). Return them as the rx "sub-stats"rx_length_errorsandrx_frame_errorsare.Signed-off-by Rick Jones <[email protected]>
Acked-by Rusty Russell <[email protected]>
Cheers,
Rusty.