* [net-next PATCH v2] ip_tunnel: Report Rx dropped in ip_tunnel_get_stats64
@ 2015-05-14 21:18 Alexander Duyck
0 siblings, 0 replies; only message in thread
From: Alexander Duyck @ 2015-05-14 21:18 UTC (permalink / raw)
To: netdev; +Cc: davem
The rx_dropped stat wasn't being reported when ip_tunnel_get_stats64 was
called. This was leading to some confusing results in my debug as I was
seeing rx_errors increment but no other value which pointed me toward the
type of error being seen.
This change corrects that by using netdev_stats_to_stats64 to copy all
available dev stats instead of just the few that were hand picked.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
---
v2: Replaced manual copy with netdev_stats_to_stats64
net/ipv4/ip_tunnel_core.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index 3998b1822d85..b04f2dbb76c4 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -185,21 +185,7 @@ struct rtnl_link_stats64 *ip_tunnel_get_stats64(struct net_device *dev,
tot->tx_bytes += tx_bytes;
}
- tot->multicast = dev->stats.multicast;
-
- tot->rx_crc_errors = dev->stats.rx_crc_errors;
- tot->rx_fifo_errors = dev->stats.rx_fifo_errors;
- tot->rx_length_errors = dev->stats.rx_length_errors;
- tot->rx_frame_errors = dev->stats.rx_frame_errors;
- tot->rx_errors = dev->stats.rx_errors;
-
- tot->tx_fifo_errors = dev->stats.tx_fifo_errors;
- tot->tx_carrier_errors = dev->stats.tx_carrier_errors;
- tot->tx_dropped = dev->stats.tx_dropped;
- tot->tx_aborted_errors = dev->stats.tx_aborted_errors;
- tot->tx_errors = dev->stats.tx_errors;
-
- tot->collisions = dev->stats.collisions;
+ netdev_stats_to_stats64(tot, &dev->stats);
return tot;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-14 21:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-14 21:18 [net-next PATCH v2] ip_tunnel: Report Rx dropped in ip_tunnel_get_stats64 Alexander Duyck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox