[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [BUG] libxenstat and xentop confused by renamed VIF interfaces

On 05/21/14 12:29, Ian Campbell wrote:
> On Wed, 2014-05-21 at 09:52 +0200, Jacek Konieczny wrote:
>> 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.

I am not sure we could easily map a renamed tap (can they be renamed?)
device to a domid.

> Perhaps parse the content of /sys/class/net/vif1.0/device/nodename to
> get the domid and devid?

I think I could prepare the patch.

One question: can I assume /sys is always mounted and the
'/sys/.../device/nodename', contains 'backend/vif/$domid/*' or should
there be a fall-back to the old behaviour?

BTW, when 'device/nodename' exists and contains 'backend/vif/*' we don't
need to check 'device/devtype' â one file access less.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.