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: Mon, 15 Oct 2018 09:41:15 -0700 [thread overview]
Message-ID: <20181015094115.2a0c7dfe@xeon-e3> (raw)
In-Reply-To: <20181011122401.GA10363@localhost.localdomain>
On Thu, 11 Oct 2018 14:24:03 +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.
> >
>
> Hi Stephen,
>
> sorry, I did not get what you mean. Current iproute implementation
> walks through tunnels list using netlink protocol and parses device
> statistics in the kernel netlink message. However it does not take
> into account the actual netlink message layout since the statistic
> attribute is nested in IFLA_PROTINFO one.
> Moreover AFAIU the related kernel code has not changed since iproute
> commit 3e953938717f, so I guess we should fix the issue in iproute code
> instead in the kernel one. Do you agree?
>
> Regards,
> Lorenzo
Applied to current iproute2.
prev parent reply other threads:[~2018-10-16 0:27 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
2018-10-11 12:24 ` Lorenzo Bianconi
2018-10-11 15:09 ` Stephen Hemminger
2018-10-15 16:41 ` Stephen Hemminger [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=20181015094115.2a0c7dfe@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;
as well as URLs for NNTP newsgroup(s).