[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 Wed, 2014-05-21 at 13:35 +0200, Jacek Konieczny wrote: > 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?) I think so, to ${vifname}-emu IIRC. > device to a domid. True. > > 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. Thank you! > 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? I think on Linux we can assume these days that /sys must exist. I'm less sure about the content of nodename, in particular WRT the behaviour of the classic-Xen forward ports. (Jan, CCd, might know). I'd be inclined to keep the existing code as a fallback for now, I think. > BTW, when 'device/nodename' exists and contains 'backend/vif/*' we don't > need to check 'device/devtype' â one file access less. Ack. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |