Message ID | 20150514200454.1537.43655.stgit@ahduyck-vm-fedora22 |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 2015-05-14 at 13:04 -0700, Alexander Duyck wrote: > 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 copying the value over from > dev->stats.rx_dropped inot tot->rx_dropped. > > Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> > --- > net/ipv4/ip_tunnel_core.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c > index 3998b1822d85..a6a980680b8a 100644 > --- a/net/ipv4/ip_tunnel_core.c > +++ b/net/ipv4/ip_tunnel_core.c > @@ -191,6 +191,7 @@ struct rtnl_link_stats64 *ip_tunnel_get_stats64(struct net_device *dev, > 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_dropped = dev->stats.rx_dropped; > tot->rx_errors = dev->stats.rx_errors; > > tot->tx_fifo_errors = dev->stats.tx_fifo_errors; Or use netdev_stats_to_stats64() to remove all these copies, as we obviously can miss some of them. -> reduce code size. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 05/14/2015 01:56 PM, Eric Dumazet wrote: > On Thu, 2015-05-14 at 13:04 -0700, Alexander Duyck wrote: >> 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 copying the value over from >> dev->stats.rx_dropped inot tot->rx_dropped. >> >> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> >> --- >> net/ipv4/ip_tunnel_core.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c >> index 3998b1822d85..a6a980680b8a 100644 >> --- a/net/ipv4/ip_tunnel_core.c >> +++ b/net/ipv4/ip_tunnel_core.c >> @@ -191,6 +191,7 @@ struct rtnl_link_stats64 *ip_tunnel_get_stats64(struct net_device *dev, >> 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_dropped = dev->stats.rx_dropped; >> tot->rx_errors = dev->stats.rx_errors; >> >> tot->tx_fifo_errors = dev->stats.tx_fifo_errors; > Or use netdev_stats_to_stats64() to remove all these copies, as we > obviously can miss some of them. > > -> reduce code size. Good point. I'll clean this up and submit a v2. Thanks. - Alex -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c index 3998b1822d85..a6a980680b8a 100644 --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c @@ -191,6 +191,7 @@ struct rtnl_link_stats64 *ip_tunnel_get_stats64(struct net_device *dev, 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_dropped = dev->stats.rx_dropped; tot->rx_errors = dev->stats.rx_errors; tot->tx_fifo_errors = dev->stats.tx_fifo_errors;
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 copying the value over from dev->stats.rx_dropped inot tot->rx_dropped. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> --- net/ipv4/ip_tunnel_core.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html