public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute 2/2] utils: fix get_rtnl_link_stats_rta stats parsing
Date: Wed, 10 Oct 2018 12:11:39 -0700	[thread overview]
Message-ID: <20181010121139.335ff091@xeon-e3> (raw)
In-Reply-To: <8b8bb899db6c8ce78d91aa8b192e6c697daf4e27.1539182623.git.lorenzo.bianconi@redhat.com>

On Wed, 10 Oct 2018 17:00:58 +0200
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:

> iproute2 walks through the list of available tunnels using netlink
> protocol in order to get device info instead of reading
> them from proc filesystem. However the kernel reports device statistics
> using IFLA_INET6_STATS/IFLA_INET6_ICMP6STATS attributes nested in
> IFLA_PROTINFO one but iproutes expects these info in
> IFLA_STATS64/IFLA_STATS attributes.
> The issue can be triggered with the following reproducer:
> 
> $ip link add ip6d0 type ip6tnl mode ip6ip6 local 1111::1 remote 2222::1
> $ip -6 -d -s tunnel show ip6d0
> ip6d0: ipv6/ipv6 remote 2222::1 local 1111::1 encaplimit 4 hoplimit 64
> tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)
> Dump terminated
> 
> Fix the issue introducing IFLA_INET6_STATS attribute parsing
> 
> Fixes: 3e953938717f ("iptunnel/ip6tunnel: Use netlink to walk through
> tunnels list")
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

Can't we fix the kernel to report statistics properly, rather than
starting iproute2 doing more /proc interfaces.

  reply	other threads:[~2018-10-11  2:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 15:00 [PATCH iproute 0/2] introduce IFLA_INET6_STATS attribute parsing Lorenzo Bianconi
2018-10-10 15:00 ` [PATCH iproute 1/2] uapi: add snmp header file Lorenzo Bianconi
2018-10-10 15:00 ` [PATCH iproute 2/2] utils: fix get_rtnl_link_stats_rta stats parsing Lorenzo Bianconi
2018-10-10 19:11   ` Stephen Hemminger [this message]
2018-10-11 12:24     ` Lorenzo Bianconi
2018-10-11 15:09       ` Stephen Hemminger
2018-10-15 16:41       ` Stephen Hemminger

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=20181010121139.335ff091@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=lorenzo.bianconi@redhat.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