From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: greearb@candelatech.com, netdev@vger.kernel.org
Subject: Re: netlink stats: Ability to get stats for a single device?
Date: Tue, 26 Oct 2010 21:56:26 +0200 [thread overview]
Message-ID: <1288122986.2652.20.camel@edumazet-laptop> (raw)
In-Reply-To: <20101026.123811.13746869.davem@davemloft.net>
Le mardi 26 octobre 2010 à 12:38 -0700, David Miller a écrit :
> From: Ben Greear <greearb@candelatech.com>
> Date: Tue, 26 Oct 2010 12:31:12 -0700
>
> > Am I missing something, or do I just need to write up a patch
> > to have netlink pay attention to the ifindex?
>
> Setting the ->ifi_index or IFLA_IFNAME attribute values appropriately
> in the getlink request doesn't work?
>
> That should give you back, amonst other things, the rtnl_link_stats
> for the device in the netlink response.
> --
Yep, it should be easy to change iproute2 to not ask a full dump
in ip/ipaddress.c :
if (rtnl_wilddump_request(&rth, preferred_family, RTM_GETLINK) < 0) ...
and instead use rtnl_send() or something like that, if user provided one
specific interface name (or index)
ip link show dev eth0
next prev parent reply other threads:[~2010-10-26 19:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 19:31 netlink stats: Ability to get stats for a single device? Ben Greear
2010-10-26 19:35 ` Eric Dumazet
2010-10-26 19:38 ` David Miller
2010-10-26 19:56 ` Eric Dumazet [this message]
2010-10-26 20:29 ` Ben Greear
2010-10-26 20:37 ` Eric Dumazet
2010-10-26 20:43 ` Ben Greear
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=1288122986.2652.20.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=greearb@candelatech.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