From: Alexander Duyck <alexander.duyck@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
Alexander Duyck <alexander.h.duyck@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [net-next PATCH] ip_tunnel: Report Rx dropped in ip_tunnel_get_stats64
Date: Thu, 14 May 2015 14:07:18 -0700 [thread overview]
Message-ID: <55550E86.9090203@gmail.com> (raw)
In-Reply-To: <1431636994.27831.64.camel@edumazet-glaptop2.roam.corp.google.com>
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
prev parent reply other threads:[~2015-05-14 21:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-14 20:04 [net-next PATCH] ip_tunnel: Report Rx dropped in ip_tunnel_get_stats64 Alexander Duyck
2015-05-14 20:56 ` Eric Dumazet
2015-05-14 21:01 ` Eric Dumazet
2015-05-14 21:21 ` Alexander Duyck
2015-05-14 21:07 ` Alexander Duyck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55550E86.9090203@gmail.com \
--to=alexander.duyck@gmail.com \
--cc=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).