xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Konieczny <jajcus@jajcus.net>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Mariusz Mazur <mmazur@axeos.com>, xen-devel <xen-devel@lists.xen.org>
Subject: Re: [BUG] libxenstat and xentop confused by renamed VIF interfaces
Date: Wed, 21 May 2014 12:48:21 +0200	[thread overview]
Message-ID: <537C8475.4030107@jajcus.net> (raw)
In-Reply-To: <1400668184.4856.10.camel@kazak.uk.xensource.com>

On 05/21/14 12:29, Ian Campbell wrote:
> On Wed, 2014-05-21 at 09:52 +0200, Jacek Konieczny wrote:
> libxenstore under Linux parses /proc/net/dev to extract 'vif.${domid}.*'
> interfaces, which won't be there, when the interfaces have been renamed.
> I suppose it is trying to exclude non-vif network devices (xenbr0, eth0
> etc).

That is one reason. The more important reason is to match interface with
a domid. Also, the /proc/net/dev file is the source of the interface
usage statistics collected by libxenstat.

>> I think the solution would be to look-up the actual interface name or
>> index in sysfs, e.g. under /sys/devices/vif-${domind}-*.
> 
> Sounds plausible.
> 
> Or perhaps check that /sys/class/net/${dev}/device/devtype contains
> "vif"? Might want to handle tap devices too. Perhaps parse the content
> of /sys/class/net/vif1.0/device/nodename to get the domid and devid?

Yes, that could work and would probably require less changes in the
code – this can be done while iterating /proc/net/dev.

Another approach would be to use the data from the xenstore, but I guess
that would be more expensive.

Greets,
	Jacek

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-05-21 10:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21  7:52 [BUG] libxenstore and xentop confused by renamed VIF interfaces Jacek Konieczny
2014-05-21  8:15 ` [BUG] libxenstat " Jacek Konieczny
2014-05-21 10:29 ` [BUG] libxenstore " Ian Campbell
2014-05-21 10:48   ` Jacek Konieczny [this message]
2014-05-21 10:53     ` [BUG] libxenstat " Ian Campbell
2014-05-21 11:35   ` Jacek Konieczny
2014-05-21 11:52     ` Ian Campbell
2014-05-21 14:01       ` Jan Beulich

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=537C8475.4030107@jajcus.net \
    --to=jajcus@jajcus.net \
    --cc=Ian.Campbell@citrix.com \
    --cc=mmazur@axeos.com \
    --cc=xen-devel@lists.xen.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).