From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute 2/2] utils: fix get_rtnl_link_stats_rta stats parsing
Date: Thu, 11 Oct 2018 14:24:03 +0200 [thread overview]
Message-ID: <20181011122401.GA10363@localhost.localdomain> (raw)
In-Reply-To: <20181010121139.335ff091@xeon-e3>
> > 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
next prev parent reply other threads:[~2018-10-11 19:51 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 [this message]
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=20181011122401.GA10363@localhost.localdomain \
--to=lorenzo.bianconi@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).